Task: there is a content manager who uploads the same type of pictures to the site and adds the same descriptions to them. The site is alien, there is no access to it.

Is it possible to write a program that will automatically do these actions for it? For example, emulation of clicking on a field, then entering text into the field, further selecting a picture from a folder and pressing the send button.

How can this be implemented?

  • What platform (Mac, Windows)? Under OS X there is a good thing Automator . Maybe analyze the protocol and make the same POST requests from your script, once logged in on that site? There are browser extensions that automate the work with sites, for example. GreaseMonkey , right ? Finally, heavy artillery is the automation of the Selenium browser. - Sergiks
  • iMacros - does everything elementary - user185970

2 answers 2

You can look towards Selenium .
When using, the browser is raised (firefox, chrome) and the user's script is simulated. You can adequately bypass forms with dynamic fields. Able to take a screenshot of the entire page, which can sometimes be useful.

    Guzzle - you don’t even need to raise selenium (and even less to wait for a real browser to work).

    By the way, selenium can work with phantomjs, with which everything also goes a little faster and in headless mode.