Skip to content

The Python bot logs to Instagram's web platform, navigates to a predefined list of hashtags and likes 50 images (if they are not already liked) before ending the session and starting a new one 15 minutes later, in order to prevent being banned. Once the final like counter has been reached, the script stops.

License

Notifications You must be signed in to change notification settings

GabrielDan92/Instagram-Like-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Like Bot

Script Demo

This is a fun project I completed after building the script initially in VBA - imagine liking Instagram images from your Excel spreadsheet :). This is not a project I want to monetize (although there are several websites that charge money for using similar bots) and you should definitely follow Instagram's Terms of Use regarding using automated software on their platform. Use at your own risk.

This script creates an incognito Chrome instance, goes to Instagram's login page and populates the login fields - the email address and password details are not hard coded - but rather retrieved from a json file that the user can save locally on his machine (I've added in the repository the json template I'm using). The next step is interacting with the notification pop-up if it is encountered, reading the hashtag list provided, navigating to each hashtag homepage and liking the pictures until a threshold is reached. This process is repeated for as long as you want, but I'd highly suggest to not overdo it in order to prevent being blocked or even banned. In its current form, I've set it up to go on each hashtag page 3 times or submitting 1050 likes, whatever comes first.

A nice feature I've added after encountering an issue 'in production' was to first of all check the HTML attribute of Instagram's heart button, in order to find out if the image was already liked or not. Without this verification step, the script simply 'clicks' on the heart button and if that image was previously liked you simply take the like back, which is the opposite of the objective I have in mind. There is also an error handler in place: if for whatever reason the image is not loaded, the script closes the browser and goes to the next iteration, waiting for 10 minutes before starting the next session.

After a lot of trial and error (and account being restricted for several hours), the current formula that works for me in order to prevent being blocked/banned is liking 50 pictures for each hashtag with 2-3 seconds random delay between each action (the delay is being randomized in order to bypass whatever pattern check Instagram might have in place) and 10 minutes delay between each hashtag. After each iteration the Chrome instance is terminated and a new one is generated. This formula should and most probably will have to be changed depending on what Instagram is doing on their end to prevent automated bots from accessing their platform.

About

The Python bot logs to Instagram's web platform, navigates to a predefined list of hashtags and likes 50 images (if they are not already liked) before ending the session and starting a new one 15 minutes later, in order to prevent being banned. Once the final like counter has been reached, the script stops.

Resources

License

Stars

Watchers

Forks

Languages