Skip to content

ankit25821/InstaBot

Repository files navigation

InstaBot

Note:

Dear visitors,

I would like to emphasize that the purpose of this project is solely for educational and learning purposes. It is important to note that scraping data from Instagram is illegal and against Instagram's policies. If you choose to engage in such activities, it may result in your account being blocked by Instagram.

To ensure that you stay within Instagram's guidelines, I highly recommend that you read through their policy on data scraping. This will give you a better understanding of what is and isn't allowed when it comes to scraping data from their platform.

Here's a link to Instagram's policy: https://www.instagram.com/about/legal/terms/api/

Please keep in mind that violating Instagram's policies can have serious consequences, so I urge you to use this project only for educational purposes and to respect Instagram's policies.

Thank you for your understanding and cooperation.

Install pakages

Install pipenv

pip install pipenv

Run following commands inside project dir

pipenv shell

Above command creates and activates virtualenv

To install application packages run following command

pipenv install

Run Project

main.py must be executed to run the project. 

python main.py

Features

  • Sending personal messages to users
  • Searching hashtags and adding Like & comment on posts

Code Details

Import InstaBot class and initialize it and set these env variables INSTA_USERNAME, INSTA_PASSWORD check example.env file for more information.

from instabot import InstaBot

bot = InstaBot()

To send personal messages to users run following method before running this method you've to set INSTA_USERNAMES env variable it contain usersnames seprated by ",".

bot.send_personal_messages()

The following method likes popular posts of the provided hashtags in INSTA_HASHTAGS.

bot.like_hashtag_posts()

The following method comments on popular posts of the provided hashtags in INSTA_HASHTAGS.

bot.comment_hashtag_posts()

The following method comments & likes on popular posts of the provided hashtags in INSTA_HASHTAGS.

bot.like_and_comment_hashtag_posts()

Use Firefox Webdriver

from instabot import InstaBot
from selenium_handler import SeleniumDriver

bot = InstaBot(selenium_driver=SeleniumDriver(driver_type='firefox'))
bot.send_personal_messages()

About

Simple Instagram Automation Tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages