It works as a browser simulator using selenium. [Only tested on Windows]
At the beginning there are four steps (It will save data and avoid wasting your time):
Before installing you need to be aware that this folder contains binary files (.exe, .etc) inside drivers
' folder from an old ChromeDriver's release for a wider compatibility.
But don't worry... if you feel unsafe you can download these files by yourself (just put there because there are people who can't do these by themselves).
drivers
' folder.driver
's folder depending on your O.S. (You can get rid of the ones that were already inside the folder)config.ini
if you want a different path) -> if you guys start complaining about this specific step I'll make some updates to have wider options PATH
[You can tick the following checkbox Add Python 3.X to PATH
while installing Python])pip install -r requirements.txt
config.ini
(See next category)py script.py
Warning: Avoid resizing or touching the Browser opened. You can minimize if you want or if you want to get rid of it just change Window at Browser's category to False
in config.ini
These commands can change depending on your configuration. Such as python/py/python3... or pip/pip3...
If you need help add me on discord or join the server and ask me (links in my profile's bio) :)
Browser's window can be invisible (in background) if Window's option is deactivated.
Login requires both username/email and password.
Find post's owner will only occur if no User Target is specified in the file.
Find followers/followings is where the bot searches and saves all followers/followings.
config.ini
you can either choose to search for followers or followings. config.ini
.Start spamming mentions in the post is where all the fun begins. It starts spamming mentions in the post.
config.ini
file lets you choose how much time it waits before each comment. You have to find out by yourself the best interval that fits into your account. It has a min, max and weight so the number isn't always the same preventing Instagram finding out it is a bot. (The smaller the interval the higher the chance of having to wait to comment again because of Instagram's A.I.) (You have to play with these numbers until you find out the best interval range for you)There are two sections:
Depending on what you choose it will save in the respective directory. Then it will choose the file's name using the following format {User Target}.txt
where User Target
is the user where we got the followers/followings.
By following the same pattern you see on the other records (@user
in each line) you can create a custom file (E.g. custom.txt
) and enable Specific File in config.ini
(removing #
) and changing the value to the path (E.g. records\custom.txt
)
When the program logs into your account it saves in a separated folder called cookies
the correspondent cookie to use it in a next time. This prevents Instagram from blocking your account from suspicious activity because you logged in too many times.
I would recommend using an alternative account which you aren't afraid of losing because it could go wrong in the worst case. However I've never experienced any bad situations using this script.
Instagram has a comment's request rate-limit to avoid spamming. From my research it has an algorithm which varies from user to user. Since Instagram doesn't provide a time for reset we have to try every x seconds. In config.ini
at Interval's category you can choose the range of the intervale by setting the minimum, maximum and the most probable number for the interval between comments (Better a range of numbers instead of always the same number in order to avoid being rate-limited). If a message pops up saying that it couldn't post the comment its because you hit that rate-limit so you just have to wait. (You don't have to do anything its all automatic but if this happens you should consider raising those intervals)
If you want to be able to send more comments you have to make a good use of your account (following, commenting, liking, etc.). That's how Instagram's A.I.'s works.
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
config.ini
's Browser's Category to fix it.