Simple Instagram Like & Comment Bot
An Instagram bot written in Python using Selenium on Google Chrome. It will go through posts in hashtag(s) and like and comment on them.
Getting Started
Please be aware of Instagram's daily limits for likes and comments to avoid getting your account banned.
Prerequisites
- Python 3
- Pip - a python package manager
- Download this file, open a command prompt and navigate to the folder containing the
get-pip.py
installer, and runpython get-pip.py
to install - Run
pip --version
to check if it has installed correctly
- Download this file, open a command prompt and navigate to the folder containing the
- ChromeDriver - a WebDriver for Chrome
- See Additional Information for more details on installing
- Selenium - a python package used to automate web browser interaction
pip install -U selenium
Instructions
- Download ChromeDriver and extract the file.
- Check the version of your Google Chrome and download the matching ChromeDriver version
- In
config.py
change the chromedriver_path to the local path of where your ChromeDriver executable file is located
chromedriver_path = "C:/local/path/to/chromedriver.exe"
-
Adjustments you can make in
config.py
to tweak the bot to your liking. (Please be aware of Instagram's daily limits for likes and comments to avoid getting banned.)- hashtag_list - List of hashtags to go through
- comments_list - List of comments to be randonmly chosen from
- number_of_posts - Number of posts to go through per hashtag
- chance_to_comment - Chance of commenting on photo
- wait_between_posts - Time to wait in between instagram posts in seconds
- wait_to_comment - Time to wait in between liking a post and commenting on it in seconds
-
Create a file named
credentials.py
to hold your account login information using the format below.- See File Structure for where the file should be placed.
USERNAME = "xxx"
PASSWORD = "xxx"
- Run the script. Enjoy your Instagram bot!
python insta-bot.py
File Structure
Twitter-Retweet-Bot
|-- config.py
|-- credentials.py
|-- insta-bot.py