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
    Fail tests that take too long to run

    GitHub | PyPI | Issues pytest-fail-slow is a pytest plugin for making tests fail that take too long to run. It adds a --fail-slow DURATION command-lin

    John T. Wodder II 4 Nov 27, 2022
    pywinauto is a set of python modules to automate the Microsoft Windows GUI

    pywinauto is a set of python modules to automate the Microsoft Windows GUI. At its simplest it allows you to send mouse and keyboard actions to windows dialogs and controls, but it has support for mo

    3.8k Jan 06, 2023
    Main purpose of this project is to provide the service to automate the API testing process

    PPTester project Main purpose of this project is to provide the service to automate the API testing process. In order to deploy this service use you s

    4 Dec 16, 2021
    Codeforces Test Parser for C/C++ & Python on Windows

    Codeforces Test Parser for C/C++ & Python on Windows Installation Run pip instal

    Minh Vu 2 Jan 05, 2022
    A small faсade for the standard python mocker library to make it user-friendly

    unittest-mocker Inspired by the pytest-mock, but written from scratch for using with unittest and convenient tool - patch_class Installation pip insta

    Vertliba V.V. 6 Jun 10, 2022
    splinter - python test framework for web applications

    splinter - python tool for testing web applications splinter is an open source tool for testing web applications using Python. It lets you automate br

    Cobra Team 2.6k Dec 27, 2022
    Subprocesses for Humans 2.0.

    Delegator.py — Subprocesses for Humans 2.0 Delegator.py is a simple library for dealing with subprocesses, inspired by both envoy and pexpect (in fact

    Amit Tripathi 1.6k Jan 04, 2023
    Automating the process of sorting files in my downloads folder by file type.

    downloads-folder-automation Automating the process of sorting files in a user's downloads folder on Windows by file type. This script iterates through

    Eric Mahasi 27 Jan 07, 2023
    Based on the selenium automatic test framework of python, the program crawls the score information of the educational administration system of a unive

    whpu_spider 该程序基于python的selenium自动化测试框架,对某高校的教务系统的成绩信息实时爬取,在检测到成绩更新之后,会通过电子邮件的方式,将更新的成绩以文本的方式发送给用户,可以使得用户在不必手动登录教务系统网站时,实时获取成绩更新的信息。 该程序仅供学习交流,不可用于恶意攻

    1 Dec 30, 2021
    Enabling easy statistical significance testing for deep neural networks.

    deep-significance: Easy and Better Significance Testing for Deep Neural Networks Contents ⁉️ Why 📥 Installation 🔖 Examples Intermezzo: Almost Stocha

    Dennis Ulmer 270 Dec 20, 2022
    PacketPy is an open-source solution for stress testing network devices using different testing methods

    PacketPy About PacketPy is an open-source solution for stress testing network devices using different testing methods. Currently, there are only two c

    4 Sep 22, 2022
    Docker-based integration tests

    Docker-based integration tests Description Simple pytest fixtures that help you write integration tests with Docker and docker-compose. Specify all ne

    Avast 326 Dec 27, 2022
    FakeDataGen is a Full Valid Fake Data Generator.

    FakeDataGen is a Full Valid Fake Data Generator. This tool helps you to create fake accounts (in Spanish format) with fully valid data. Within this in

    Joel GM 64 Dec 12, 2022
    Ab testing - The using AB test to test of difference of conversion rate

    Facebook recently introduced a new type of offer that is an alternative to the current type of bidding called maximum bidding he introduced average bidding.

    5 Nov 21, 2022
    Python script to automatically download from Zippyshare

    Zippyshare downloader and Links Extractor Python script to automatically download from Zippyshare using Selenium package and Internet Download Manager

    Daksh Khurana 2 Oct 31, 2022
    Object factory for Django

    Model Bakery: Smart fixtures for better tests Model Bakery offers you a smart way to create fixtures for testing in Django. With a simple and powerful

    Model Bakers 632 Jan 08, 2023
    Green is a clean, colorful, fast python test runner.

    Green -- A clean, colorful, fast python test runner. Features Clean - Low redundancy in output. Result statistics for each test is vertically aligned.

    Nathan Stocks 756 Dec 22, 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
    An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet 😈

    An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet 😈

    Brandon Galbraith 276 Mar 03, 2021
    PyBuster A directory busting tool for web application penetration tester, written in python

    PyBuster A directory busting tool for web application penetration tester, written in python. Supports custom wordlist,recursive search. Screenshots Pr

    Anukul Pandey 4 Jan 30, 2022