automate instagram activities using instagram bot - like follow/unfollow comment; python requests lib

mpawlak2 mpawlak2 Last update: Apr 14, 2024

Instalike - Instagram bot (works without api)

Donate

Some likes

Available features

  • Automated likes
  • Automated follows
  • Automated unfollows (requires database connection)
  • Compatible with PythonAnywhere

Configuration Guide

Edit default.cfg file

Option Meaning
BOT::WorkWholeTime If set to True bot will work whole time, no breaks. In other case periods will be in use.
BOT::BotWorkAtDay If set to True bot will work from between specified hours. Requires option BOT::WorkWholeTime set to True.
BOT::StopAfterNumerOfMinutes not working
BOT::WorkHoursPerDay If option BOT::WorkWholeTime is set to False bot will work in 2 to 5 periods that sum up to that amount.
BOT::StartHour Requires option BOT::WorkAtDay set to True. Specify hour at which bot should start working.
BOT::EndHour Requires option BOT::WorkAtDay set to True. Specify hour at which bot should stop working.
BOT::LogDBOperations Whether or not to log db queries. True or False.
BOT::InstaLike If set to True bot will be liking photos.
BOT::InstaFollow If set to True bot will be following users.
BOT::InstaComment not working
BOT::InstaMessage not working
NOTIFICATIONS::EnableEmailSummaryNotifications not working
NOTIFICATIONS::SendAttachment not working
NOTIFICATIONS::EmailAdress not working
NOTIFICATIONS::EmailServerAddress not working
NOTIFICATIONS::EmailServerPassword not working
BAN::DoNotGetBanned not working
INSTAGRAM::Username Instagram username.
INSTAGRAM::Password Instagram password.
INSTALIKE::MaxLikesPerHour Estimate what max likes per hour should be, based on this setting wait times are calculated. 200 is default.
INSTALIKE::LikeFeedMedia If set to True bot will also scrap media from your feed.
INSTALIKE::Tags Specify tags that bot will use to find and like photos or follow users. Make sure to put comma between tags e.g. tag1, tag2, tag3, tag4
INSTAFOLLOW::MaxFollowsPerHour Max users that will be followed per hour. Default value is 8
INSTAFOLLOW::MaxUnfollowsPerHour Max users that will be unfollowed per hour. Default value is 2. Unfollowing functionality in progress.
INSTAFOLLOW::UnfollowAfterNoOfDays Unfollow users who do not follow you back after that amount of days. 6 is default
BLACKLIST::PhotoTagsList Specify tags that you would like to avoid. e.g. comma, separated, list, format
BLACKLIST::UserNameBlacklist Don't like media posted by user with these names. Don't follow users with these names. Comma separated list e.g. mickey15, hulk12, lover2020
BLACKLIST::UserDescription Avoid users whose description contains any of these words. e.g. comma, separated, list, format
LIKEFILTER::MinLikesOnPhoto Do not like photos with less likes than specified value, default value is 0 which is no limit
LIKEFILTER::MaxLikesOnPhoto Do not like photos with more likes than specified value, default value is 0 which is no limit

Starting bot

If you have provided your username and password combination in default.cfg file then start with python main.py otherwise use python main.py -u username -p password.

You can create a new configuration file by copying default.cfg, and then you can pass it on startup like that: python main.py -u username -p password -c filename - where filename is the name of the new configuration file.

Requirements

  • python 3+
  • python -m pip install requests
  • python -m pip install peewee

PythonAnywhere setup (bot won't work if server location is far away from your real location)

Set up a PythonAnywhere account and start a bash console. Clone the repository and then move to the directory: $ git clone https://github.com/mpawlak2/instalike-instagram-bot.git $ cd instalike-instagram-bot.git Install requirements like this: $ pip3 install -U requests --user $ pip3 install -U peewee --user The installation is now complete. Now, you can edit default.cfg file or run the bot using the following command: $ python3 main.py -u username -p password

External libs docs

Peewee documentation

Subscribe to our newsletter