AbhilashDatta
InstagramBot
Python

An Instagram bot that can mass text users, receive and read a text, and store it somewhere with user details.

Last updated May 5, 2026
19
Stars
8
Forks
1
Issues
0
Stars/day
Attention Score
10
Language breakdown
No language data available.
Files click to expand
README

Instagram Bot :robot:

July 14, 2021

Overview 👍

A multifunctionality automated instagram bot that can mass text users, receive and read a message and store it somewhere with user details and much more. Powered by Selenium.

forthebadge made-with-python

Get Started 🤞

  • PIPENV: For virtual environment

$ pip install pipenv


  • Installing required libraries and versions

$ pipenv install


  • Starting the PIP virtual environment

$ pipenv shell


Launching Instagrambot Web App 🎮


 Web App

Inside the virtual environment, type:

$ flask run

and open the URL.


Multipurpose Bot 🛰️ 🛰

  • Login-out using credentials
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.logout()


  • Direct Message anyone
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.dm('user','Hi there')
bot.logout()


  • Follow another user
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.follow_users(['user1','user2'])
bot.logout()


  • Like a number of posts by a user/hashtag
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.likebykeyword(keyword, numOfPosts)
bot.logout()


  • Create a group and direct message in it
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.group_dm(['user1','user2', 'user3'],'Final Testing')
bot.logout()


  • Direct Message multiple users
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.multiple_dm(['user1','user2', 'user3'],'Final Testing')
bot.logout()


  • Direct Message multiple users from a csv file
from BOT import Bot
bot = Bot()
bot.login(username, password)

if csv file doesn't contains message column

bot.multipledmfrom_csv('path to csv file','general message')

else

bot.multipledmfrom_csv('path to csv file') bot.logout()


  • Direct Message multiple users from a db
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.multipledmfromdb(generalmessage)
bot.logout()


  • Direct Message to all Followers
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.multipledmfollowers(general_message)
bot.logout()


  • Retrieve the latest message from multiple user

    UPDATE THE IMAGES DIRECTORY WITH SCREENSHOTS TAKEN FROM YOUR COMPUTER

    UPDATE THE DATABASE CREDENTIALS IN db_credentials.py FILE

For further reference watch this video: https://www.youtube.com/watch?v=XI_GyOnw3M0

from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.retrieve_messages([users])
bot.logout()


  • Retrieve the latest message from multiple user in a csv file

    UPDATE THE IMAGES DIRECTORY WITH SCREENSHOTS TAKEN FROM YOUR COMPUTER

    UPDATE THE DATABASE CREDENTIALS IN db_credentials.py FILE

For further reference watch this video: https://www.youtube.com/watch?v=XI_GyOnw3M0

from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.retrievemessagesfrom_csv('path to csv file')
bot.logout()


  • Retrieve the latest message from users from our inbox

    UPDATE THE IMAGES DIRECTORY WITH SCREENSHOTS TAKEN FROM YOUR COMPUTER

    UPDATE THE DATABASE CREDENTIALS IN db_credentials.py FILE

For further reference watch this video: https://www.youtube.com/watch?v=XI_GyOnw3M0

from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.retrievemessagesfrom_inbox(tolerance = 2)
bot.logout()


  • Download posts by a keyword
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.download_pics(keyword)
bot.logout()


  • Share latest post according to preferred category (as in replied message):
from BOT import Bot
bot = Bot()
bot.login(username, password)
bot.sharelatestpost()
bot.logout()


Individual Functionalities:

    • Login into Instagram: (Achieved)
      from login import Login
      

      Login(driver, <username>, <password>)


    • Texting to a Single User: (Achieved)

      from dm import
      

      Dm(driver, <user>, <message>)


    • Following Users: (Achieved)

      from followusers import Followusers
      

      Follow_users(driver, ['user1','user2'])


    • Retrieving messages from single/multiple user(s): (Achieved)

          UPDATE THE IMAGES DIRECTORY WITH SCREENSHOTS TAKEN FROM YOUR COMPUTER

          UPDATE THE DATABASE CREDENTIALS IN db_credentials.py FILE

      For further reference watch this video: https://www.youtube.com/watch?v=XI_GyOnw3M0

      from retrievemessages import Retrievemessages

      Retrieve_messages(driver, [users])


    • Retrieving messages from single/multiple user(s) with names in a csv file: (Achieved)

          UPDATE THE IMAGES DIRECTORY WITH SCREENSHOTS TAKEN FROM YOUR COMPUTER

          UPDATE THE DATABASE CREDENTIALS IN db_credentials.py FILE

      For further reference watch this video: https://www.youtube.com/watch?v=XI_GyOnw3M0

      from retrievemessagesfromcsv import Retrievemessagesfromcsv

      Retrievemessagesfrom_csv(driver, 'path to csv file')


    • Retrieving messages from single/multiple user(s) from inbox: (Achieved)

          UPDATE THE IMAGES DIRECTORY WITH SCREENSHOTS TAKEN FROM YOUR COMPUTER

          UPDATE THE DATABASE CREDENTIALS IN db_credentials.py FILE

      For further reference watch this video: https://www.youtube.com/watch?v=XI_GyOnw3M0

      from retrievemessagesfrominbox import Retrievemessagesfrominbox

      Retrievemessagesfrom_inbox(tolerance = 1)


    • Texting to Multiple Users: (Achieved)

      from multipledm import Multipledm
      

      Multiple_dm(driver, [users], <message>)


    • Texting to Multiple Users from a csv file: (Achieved)

      from multipledmfromcsv import Multipledmfromcsv
      

      Multipledmfrom_csv(driver, 'path to csv file', <general message (optional)>)


    • Texting to Multiple Users from a Database: (Achieved)

      from multipledmfromdb import Multipledmfromdb
      

      Multipledmfrom_db(driver, <general message (optional)>)


    • Texting to all Followers: (Achieved)

      from multipledmfollowers import Multipledmfollowers
      

      Multipledmfollowers(driver, <general message (optional)>)


    • Creating Group and texting in it: (Achieved)

      from groupdm import Groupdm
      

      Group_dm(driver, [users], <message>)


    • Downloading a number of posts with a keyword: (Achieved)

      from downloadpics import Downloadpics
      

      Download_pics(driver, <keyword>)


    • Liking a number of posts of a user/hashtag: (Achieved)

      from likebykeyword import Likebykeyword
      

      Likebykeyword(driver, <keyword>)


    • Logging Out: (Achieved)

      from logout import Logout
      

      Logout(driver)


    • GUI app: (On the way)

Platform: Python files. Virtual Environment using PIPENV. Libraries: Selenium, Instabot, InstaPy, Time, Pyperclip, Pyautogui, OpenCv, os, wget, pymongo Softwares: Windows Chromedriver, MongoDB Low-Level Specs: Whole program is built in Object Oriented fashion and Modular structure is followed throughout.

🔗 More in this category

© 2026 GitRepoTrend · AbhilashDatta/InstagramBot · Updated daily from GitHub