Just to broaden your horizons, today we will write an Instagram follower bot. The aim here is to automatically follow certain people or pages thanks to the bot. Based on this, you can like posts via bot or pull content from the pages of people you like, it's up to your imagination.

    I will not explain the codes one by one to you here as it will take too much time. I will only explain the working logic and I will put the source codes at the end of the article, you can download it from here and test it yourself. The main goal is for you to understand how it works.

    In this project, we will use the Selenium library to create a virtual browser. First of all, you must understand that we must have an Instagram account that we will use for the bot. Here you can use your existing instagram account or create a new account.Later, when you examine the code, you will see that I added the people or pages I want to follow to a list, the bot will automatically pull the people or pages from this list in order and go to their pages and click the follow button.

 

Here is a line of code that you will see frequently in Thread.Sleep().  I use this all the time, I make the bot wait for a while to make sure it loads the page it wants to go to. If I don't do this, I can't select the relevant elements on the page before the page loads. You can make a like bot or a follower bot with this logic, as I said, it's up to you. Instagram Button

 

    There is nothing illegal here. But there are many software developers who make illegal bots with this logic. There are a lot of people in the market who sell fake followers or fake views on YouTube. I always do this kind of thing just to make things easier. How you use it is up to you. But I hope you use it for good things.

 

 

    To summarize in order: 

  1. The bot goes to the Instagram page
  2.  Fill in the username and password inputs and click on the login button
  3. Clicks the Not Now button that appears on the save information screen
  4. Clicks the Not now button on the Get Notifications screen
  5. After the bot account is opened, it goes to the first account to be followed in the list
  6. After reaching the relevant person's account, the bot clicks on the Follow Button and moves on to the next account to follow
  7. After following all the people in the list, it closes the virtual browser

    You can access the source codes of the project here. Remember, this is an example bot application that can  only make your job easier but also be used for useful purposes. Source Code of the Project: Here