📜 ⬆️ ⬇️

Instagram Like Bot

It all started with the fact that the spouse started an account on Instagram, started posting a bunch of photos and get offended if I don't like them in time. I had to do the automation of family relationships.

The customer in my face identified the following requirements:
1. Simulation of work on Instagram as a regular user, likeing in one thread (so that Instagram won't ban my bot).
2. The ability to auto-like an arbitrary number of accounts with an arbitrary depth of likes.
3. Run through the sheduler, work in the background.

The choice fell on nodejs. Why nodejs? Therefore, on Perl (which I have been using from time to time for several years), I didn’t want to do it, and nodejs attracted distinct package managers, native support for JSON and, in general, Javascript in the browser is more native than any Python.
')


Of course, Instagram has its own API and theoretically it could be used, but programs that use the Instagram API require a special appruvol, but I wanted the script to be used massively.

The full script is available at github.com/get-a-clue/nodejs

For simulation of the browser, selenium is of course used. In the original version of the script, the Chrome browser is launched for debugging, if you want to use the script only in the console, you need to replace the chrome with phantomjs in line 24. Phantomjs is a Webkit browser with all the CSS, JS and t .d

Installation and launch is described in the comments to the script. In addition, you will need to install the nodejs yourself and configure the periodic launch of the script on a schedule. Of course, the script is still far from perfect, you need to do reporting and error handling, but it successfully performs its function, it saves me time and the wife is now happy. :)

Source: https://habr.com/ru/post/275965/


All Articles