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

Overview

Instagram Bot 🤖

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.like_by_keyword(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.multiple_dm_from_csv('path to csv file','general message')
    # else
    bot.multiple_dm_from_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.multiple_dm_from_db(general_message)
    bot.logout()
    

    • Direct Message to all Followers
    from BOT import Bot
    bot = Bot()
    bot.login(username, password)
    bot.multiple_dm_followers(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.retrieve_messages_from_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.retrieve_messages_from_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.share_latest_post()
    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 __follow_users__ import Follow_users
      
      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 __retrieve_messages__ import Retrieve_messages
      
      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 __retrieve_messages_from_csv__ import Retrieve_messages_from_csv
      
      Retrieve_messages_from_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 __retrieve_messages_from_inbox__ import Retrieve_messages_from_inbox
      
      Retrieve_messages_from_inbox(tolerance = 1)
      

    • Texting to Multiple Users: (Achieved)
      from __multiple_dm__ import Multiple_dm
      
      Multiple_dm(driver, [users], <message>)
      

    • Texting to Multiple Users from a csv file: (Achieved)
      from __multiple_dm_from_csv__ import Multiple_dm_from_csv
      
      Multiple_dm_from_csv(driver, 'path to csv file', <general message (optional)>)
      

    • Texting to Multiple Users from a Database: (Achieved)
      from __multiple_dm_from_db__ import Multiple_dm_from_db
      
      Multiple_dm_from_db(driver, <general message (optional)>)
      

    • Texting to all Followers: (Achieved)
      from __multiple_dm_followers__ import Multiple_dm_followers
      
      Multiple_dm_followers(driver, <general message (optional)>)
      

    • Creating Group and texting in it: (Achieved)
      from __group_dm__ import Group_dm 
      
      Group_dm(driver, [users], <message>)
      

    • Downloading a number of posts with a keyword: (Achieved)
      from __download_pics__ import Download_pics
      
      Download_pics(driver, <keyword>)
      

    • Liking a number of posts of a user/hashtag: (Achieved)
      from __like_by_keyword__ import Like_by_keyword
      
      Like_by_keyword(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.

    Owner
    Abhilash Datta
    I'm a 3rd year undergraduate from @IITKGP interested in Software Development and AI. I believe in forever learning can do anything for the betterment of society
    Abhilash Datta
    pytest plugin that let you automate actions and assertions with test metrics reporting executing plain YAML files

    pytest-play pytest-play is a codeless, generic, pluggable and extensible automation tool, not necessarily test automation only, based on the fantastic

    pytest-dev 67 Dec 01, 2022
    Python scripts for a generic performance testing infrastructure using Locust.

    TODOs Reference to published paper or online version of it loadtest_plotter.py: Cleanup and reading data from files ARS_simulation.py: Cleanup, docume

    Juri Tomak 3 Dec 15, 2022
    Code coverage measurement for Python

    Coverage.py Code coverage testing for Python. Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and

    Ned Batchelder 2.3k Jan 04, 2023
    Mypy static type checker plugin for Pytest

    pytest-mypy Mypy static type checker plugin for pytest Features Runs the mypy static type checker on your source files as part of your pytest test run

    Dan Bader 218 Jan 03, 2023
    Automatically mock your HTTP interactions to simplify and speed up testing

    VCR.py 📼 This is a Python version of Ruby's VCR library. Source code https://github.com/kevin1024/vcrpy Documentation https://vcrpy.readthedocs.io/ R

    Kevin McCarthy 2.3k Jan 01, 2023
    🏃💨 For when you need to fill out feedback in the last minute.

    BMSCE Auto Feedback For when you need to fill out feedback in the last minute. 🏃 💨 Setup Clone the repository Run pip install selenium Set the RATIN

    Shaan Subbaiah 10 May 23, 2022
    Doggo Browser

    Doggo Browser Quick Start $ python3 -m venv ./venv/ $ source ./venv/bin/activate $ pip3 install -r requirements.txt $ ./sobaki.py References Heavily I

    Alexey Kutepov 9 Dec 12, 2022
    A pure Python script to easily get a reverse shell

    easy-shell A pure Python script to easily get a reverse shell. How it works? After sending a request, it generates a payload with different commands a

    Cristian Souza 48 Dec 12, 2022
    Python package to easily work with selenium and manage tabs effectively.

    Simple Selenium The aim of this package is to quickly get started with working with selenium for simple browser automation tasks. Installation Install

    Vishal Kumar Mishra 1 Oct 27, 2021
    Pytest support for asyncio.

    pytest-asyncio: pytest support for asyncio pytest-asyncio is an Apache2 licensed library, written in Python, for testing asyncio code with pytest. asy

    pytest-dev 1.1k Jan 02, 2023
    Lightweight, scriptable browser as a service with an HTTP API

    Splash - A javascript rendering service Splash is a javascript rendering service with an HTTP API. It's a lightweight browser with an HTTP API, implem

    Scrapinghub 3.8k Jan 03, 2023
    Hamcrest matchers for Python

    PyHamcrest Introduction PyHamcrest is a framework for writing matcher objects, allowing you to declaratively define "match" rules. There are a number

    Hamcrest 684 Dec 29, 2022
    Photostudio是一款能进行自动化检测网页存活并实时给网页拍照的工具,通过调用Fofa/Zoomeye/360qua/shodan等 Api快速准确查询资产并进行网页截图,从而实施进一步的信息筛查。

    Photostudio-红队快速爬取网页快照工具 一、简介: 正如其名:这是一款能进行自动化检测,实时给网页拍照的工具 信息收集要求所收集到的信息要真实可靠。 当然,这个原则是信息收集工作的最基本的要求。为达到这样的要求,信息收集者就必须对收集到的信息反复核实,不断检验,力求把误差减少到最低限度。我

    s7ck Team 41 Dec 11, 2022
    DUCKSPLOIT - Windows Hacking FrameWork using Reverse Shell

    Ducksploit Install Ducksploit Hacker setup raspberry pico Download https://githu

    2 Jan 31, 2022
    Sixpack is a language-agnostic a/b-testing framework

    Sixpack Sixpack is a framework to enable A/B testing across multiple programming languages. It does this by exposing a simple API for client libraries

    1.7k Dec 24, 2022
    Python dilinin Selenium kütüphanesini kullanarak; Amazon, LinkedIn ve ÇiçekSepeti üzerinde test işlemleri yaptığımız bir case study reposudur.

    Python dilinin Selenium kütüphanesini kullanarak; Amazon, LinkedIn ve ÇiçekSepeti üzerinde test işlemleri yaptığımız bir case study reposudur. LinkedI

    Furkan Gulsen 8 Nov 01, 2022
    Python tools for penetration testing

    pyTools_PT python tools for penetration testing Please don't use these tool for illegal purposes. These tools is meant for penetration testing for leg

    Gourab 1 Dec 01, 2021
    Useful additions to Django's default TestCase

    django-test-plus Useful additions to Django's default TestCase from REVSYS Rationale Let's face it, writing tests isn't always fun. Part of the reason

    REVSYS 546 Dec 22, 2022
    Code for "SUGAR: Subgraph Neural Network with Reinforcement Pooling and Self-Supervised Mutual Information Mechanism"

    SUGAR Code for "SUGAR: Subgraph Neural Network with Reinforcement Pooling and Self-Supervised Mutual Information Mechanism" Overview train.py: the cor

    41 Nov 08, 2022
    Bayesian A/B testing

    bayesian_testing is a small package for a quick evaluation of A/B (or A/B/C/...) tests using Bayesian approach.

    Matus Baniar 35 Dec 15, 2022