Instagram-Automation ??‍☠️???‍??

Making an Instagram bot using Selenium and Python Want to get more Instagram followers? Don’t want to create good and engaging content? This article is for you.♥ Pretty much everyone wants to have more followers on their social media of choice. If you aren’t willing to shell out the big bucks on buying sketchy followers and want to automate this task, the best solution I found is using Selenium. Selenium is a Python library that automates web browsers. The Instagram API is intentionally designed to make it nearly impossible to farm followers by using it so we have to rely on some unorthodox solutions. We are going to use the oldest trick in the book to gain some followers. We are just going to follow people at random and hope they follow us back. From some extensive testing, I determined that if you are following people at random about 1 in 10 will follow you back. Not great, but better than nothing. First, you are going to need to set up and install the Selenium library. This website and a couple of google searches should be enough to get this up and going. Once you have selenium set up we are ready to create our python file The main strategy behind this is using the automated browsing tools that Selenium provides to log onto your account on the Instagram website, navigate past all of those annoying pop-ups, search the profile of some famous high profile people and just start following people that follow them randomly. I put random time delays between most of the actions to simulate the randomness of a human user using the website and try and avoid Instagram’s bot detection algorithms. If you want to customize this script all you have to do is open Instagram in your normal browser, right-click the screen and press Inspect Element. Hovering over any part of the website should give you the elements xpath which when put into the method find_element_by_xpath() allows the Selenium driver to alter it. Pretty much the only ones you need are send_keys() and click() to get started making your own fun stuff.?‍♂️?‍♂️?‍♂️ This is a pretty basic script designed to show off how the Selenium tools can be used to interact with the Instagram website and there is tons of room to improve. In a future article, I plan on showing how to connect this script to a virtual machine on google cloud in order to have it run daily with no effort from you as opposed to manually running it every time. Another possible area I could delve deeper into is making a CSV file containing the people the script has previously followed and then unfollowing them randomly at a later date(gotta maintain that ratio). Note: there are a few issues with this script, foremost among them is that you can follow anyone. We are just following the most recent followers of famous people, this could include anyone from normal people, other bots, or your boss. No one wants to use a bot on their personal account and end up following a bunch of kids (creepy). I wasn’t able to find a solution to that problem, so after testing this on a throwaway Instagram account I decided not to proceed with using it on my personal account. If anyone has ideas on how to solve this issue, leave a comment below. Another small issue is that occasionally the Instagram website changes slightly and you have to go through and find new xpath’s of elements using the Inspect Element tool, but this is just a couple of minutes of work and really easy to pull off. If you get some sort of error like element not found, that is probably the issue.


View Github