2

I am quite fluent in Python, but have only really used it for data analysis.

I would like to learn how I can interact with webpages. For instance, I want to start by writing a code that will press a button on a webpage for me.

I just don't know where to start or what to google to find resources about this.

Could anyone point me out in the right directions, or suggest some key words that I could search for?

Thanks.

5
  • 3
    I use Selenium. Don't know if there's a general name for that sort of thing. Commented Jun 10, 2016 at 19:54
  • 1
    stackoverflow.com/questions/26823600/… This might get you started.... Commented Jun 10, 2016 at 19:56
  • Thanks guys. Got down votes as expected, but I literally don't know how to "say what you tried" or "provide error" messages with a question like this. Commented Jun 10, 2016 at 20:03
  • You may be interested in github.com/jjlee/mechanize. Commented Jun 10, 2016 at 20:14
  • @user1551817 Phathomjs is the weapon of choice. There are python binding to it. Commented Jun 10, 2016 at 21:45

1 Answer 1

4

Have you tried to use the pyautogui module, which allows you to programmatically control the mouse and the keyboard?

An example of an automatic form filler on a webpage is available in chapter 18 of the Automate the Boring Stuff with Python book.

Sign up to request clarification or add additional context in comments.

1 Comment

Links can be helpful, but it's much better to include the relevant part of the link in your answer, in case the links stop working.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.