Awesome Open Source
Awesome Open Source

Simple Instagram Like & Comment Bot ❤️💬

Python 3.6 | 3.7 | 3.8 selenium Open Source? Yes!

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.

Table of Contents

Getting Started

Please be aware of Instagram's daily limits for likes and comments to avoid getting your account banned.


  • Python 3
  • Pip - a python package manager
    • Download this file, open a command prompt and navigate to the folder containing the installer, and run python to install
    • Run pip --version to check if it has installed correctly
  • ChromeDriver - a WebDriver for Chrome
  • Selenium - a python package used to automate web browser interaction pip install -U selenium


  1. Download ChromeDriver and extract the file.
    • Check the version of your Google Chrome and download the matching ChromeDriver version

Check Chrome Version

  1. In change the chromedriver_path to the local path of where your ChromeDriver executable file is located
chromedriver_path = "C:/local/path/to/chromedriver.exe"
  1. Adjustments you can make in 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
  2. Create a file named to hold your account login information using the format below.

USERNAME = "xxx"
PASSWORD = "xxx"
  1. Run the script. Enjoy your Instagram bot!

File Structure





Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

How To Contribute

  1. Fork the repository to your own Github account.
  2. Clone the project to your machine.
  3. Create a branch locally with a succinct but descriptive name.
  4. Commit changes to the branch.
  5. Following any formatting and testing guidelines specific to this repo.
  6. Push changes to your fork.
  7. Open a Pull Request in my repository.

Creator / Maintainer

Annie Wu (anniedotexe)

If you have any questions, comments, or concerns, feel free to contact me below.

Connect via Email

This project was created for educational purposes and for personal and open-source use.

If you like my content or find this code useful, give it a ⭐️ or support me by buying me a coffee ☕️😀

Buy Me A Coffee

Additional Information

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,120,145
Python3 (32,415
Bot (12,065
Automation (6,783
Script (3,851
Selenium (3,004
Instagram (2,063
Selenium Webdriver (1,070
Selenium Python (449
Google Chrome (345
Chromedriver (291
Instagram Bot (253
Related Projects