Fytex / Instagram-Giveaways-Winner

Instagram Bot which when given a post url will spam mentions to increase the chances of winning. Win Instagram Giveaways!
MIT License
118 stars 23 forks source link
cheating comments giveaways hacktoberfest hacktoberfest2020 instagram instagram-bot instagram-scraper instagram-script macros mentions posts python python3 selenium selenium-python selenium-webdriver spam web-scraper winning

Instagram-Giveaways-Winner

GitHub top language GitHub tag (latest by date) GitHub last commit

Instagram Bot which when given a post url will spam mentions to increase the chances of winning

How does this bot work?

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):

  1. Log in
  2. Find post's owner
  3. Find followers/followings
  4. Start spamming mentions in the post

Pre-Setup Warning

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).

  1. Go to chrome://settings/help and find out which is your Chrome's version
  2. Go to https://chromedriver.chromium.org/downloads and find the latest version which supports your Chrome's version.
  3. Download the one for your O.S.
  4. Pick the executable and put in drivers' folder.
  5. Replace and rename the executable with one that was already inside driver's folder depending on your O.S. (You can get rid of the ones that were already inside the folder)

Setup

  1. Install Google Chrome (Check Browser's category in 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
  2. Install Python 3.6+ (Don't forget to add in system variable PATH [You can tick the following checkbox Add Python 3.X to PATH while installing Python])
  3. Open terminal, change directory to Instagram-Giveaways-Winner's folder and type: pip install -r requirements.txt
  4. Edit config.ini (See next category)
  5. In the same terminal type: 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) :)

All settings/credentials can be changed in config.ini.

Browser's window can be invisible (in background) if Window's option is deactivated.

How do the records (database) work?

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)

How do the cookies work (auto-login)?

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.

Warnings:

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.

Future Updates:

Known Bugs:

    raise exception_class(message, screen, stacktrace)
        selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary