This bot:
- Opens an automated browser window.
- Logs in to a predetermined Instagram account (chosen when running the bot) using a username and password.
- Finds and loads random posts it finds via a predetermined list of hashtags.
- Likes the chosen post (up to a predefined likes-per-run limit).
- Comments on the chosen post (up to a predefined comments-per-run limit). The comments are randomly selected from a predefined comment list.
- While there are still comments or likes to be placed, goes back to step 3.
- Download and extract the Firefox Webdriver executable
geckodriver.exe
into/bin/browser_drivers
(You may have to create these directories for yourself). You can download the driver executable from Mozilla's official repo here. - The required Python packages are listed in the
environment.yml
file. If you use Anaconda, you can create a new Anaconda environment by typing:conda env create -f environment.yml
- Rename
/config/demo_user_config.yaml
to/config/user_config.yaml
(i.e. remove the "demo_
" part) - Rename the top-level account names in
/config/user_config.yaml
to ones you will remember easily (it is recommended to set them to your Instagram's username). - Fill in your accounts login credentials as well as the desired hashtags and comments for the bot to use.
- You're all set.
To run the bot:
- From the project's root folder, type (On Linux or macOS):
Or on Windows:
python3 ./run.py myaccount
Wherepython3 .\run.py myaccount
myaccount
should be replaced by your account name, as listed in the top-level account names in/config/user_config.yaml
.