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
    The source code and slide for my talk about the subject: unittesing in python

    PyTest Talk This talk give you some ideals about the purpose of unittest? how to write good unittest? how to use pytest framework? and show you the ba

    nguyenlm 3 Jan 18, 2022
    bulk upload files to libgen.lc (Selenium script)

    LibgenBulkUpload bulk upload files to http://libgen.lc/librarian.php (Selenium script) Usage ./upload.py to_upload uploaded rejects So title and autho

    8 Jul 07, 2022
    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
    Thin-wrapper around the mock package for easier use with pytest

    pytest-mock This plugin provides a mocker fixture which is a thin-wrapper around the patching API provided by the mock package: import os class UnixF

    pytest-dev 1.5k Jan 05, 2023
    Python Webscraping using Selenium

    Web Scraping with Python and Selenium The code shows how to do web scraping using Python and Selenium. We use as data the https://sbot.org.br/localize

    Luรญs Miguel Massih Pereira 1 Dec 01, 2021
    A configurable set of panels that display various debug information about the current request/response.

    Django Debug Toolbar The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/respons

    Jazzband 7.3k Jan 02, 2023
    Just a small test with lists in cython

    Test for lists in cython Algorithm create a list of 10^4 lists each with 10^4 floats values (namely: 0.1) - 2 nested for iterate each list and compute

    Federico Simonetta 32 Jul 23, 2022
    This repository contains a testing script for nmigen-boards that tries to build blinky for all the platforms provided by nmigen-boards.

    Introduction This repository contains a testing script for nmigen-boards that tries to build blinky for all the platforms provided by nmigen-boards.

    S.J.R. van Schaik 4 Jul 23, 2022
    ์ž๋™ ๊ฑด๊ฐ•์ƒํƒœ ์ž๊ฐ€์ง„๋‹จ ๋ฉ”ํฌ๋กœ ์„œ๋ฒ„์ „์šฉ

    Auto-Self-Diagnosis-for-server ์ž๋™ ์ž๊ฐ€์ง„๋‹จ ๋ฉ”ํฌ๋กœ ์„œ๋ฒ„์ „์šฉ ์ด ํ”„๋กœ๊ทธ๋žจ์€ SaidBySolo๋‹˜์˜ auto-self-diagnosis๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์ œ์ž‘ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๊ฐœ์ธ ์‚ฌ์šฉ ๋ชฉ์ ์œผ๋กœ ์ œ์ž‘ํ•˜์˜€๊ธฐ ๋•Œ๋ฌธ์— ์ถ”ํ›„ ์—…๋ฐ์ดํŠธ๋Š” ์ง„ํ–‰ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์˜์กด์„ฑ G

    JJooni 3 Dec 04, 2021
    This project is used to send a screenshot by email of your MyUMons schedule using Selenium python lib (headless mode)

    MyUMonsSchedule Use MyUMonsSchedule python script to send a screenshot by email (Gmail) of your MyUMons schedule. If you use it on Windows, take care

    Pierre-Louis D'Agostino 6 May 12, 2022
    Test python asyncio-based code with ease.

    aiounittest Info The aiounittest is a helper library to ease of your pain (and boilerplate), when writing a test of the asynchronous code (asyncio). Y

    Krzysztof Warunek 55 Oct 30, 2022
    d4rk Ghost is all in one hacking framework For red team Pentesting

    d4rk ghost is all in one Hacking framework For red team Pentesting it contains all modules , information_gathering exploitation + vulnerability scanning + ddos attacks with 12 methods + proxy scraper

    d4rk sh4d0w 15 Dec 15, 2022
    frwk_51pwn is an open-sourced remote vulnerability testing and proof-of-concept development framework

    frwk_51pwn Legal Disclaimer Usage of frwk_51pwn for attacking targets without prior mutual consent is illegal. frwk_51pwn is for security testing purp

    51pwn 4 Apr 24, 2022
    Python version of the Playwright testing and automation library.

    ๐ŸŽญ Playwright for Python Docs | API Playwright is a Python library to automate Chromium, Firefox and WebKit browsers with a single API. Playwright del

    Microsoft 7.8k Jan 02, 2023
    Youtube Tool using selenium Python

    YT-AutoLikeComment-AutoReportComment-AutoComment Youtube Tool using selenium Python Auto Comment Auto Like Comment Auto Report Comment Usage: 1. Insta

    Rahul Joshua Damanik 1 Dec 13, 2021
    Scraping Bot for the Covid19 vaccination website of the Canton of Zurich, Switzerland.

    Hi ๐Ÿ‘‹ , I'm David A passionate developer from France. ๐ŸŒฑ Iโ€™m currently learning Kotlin, ReactJS and Kubernetes ๐Ÿ‘จโ€๐Ÿ’ป All of my projects are available

    1 Nov 14, 2021
    A framework-agnostic library for testing ASGI web applications

    async-asgi-testclient Async ASGI TestClient is a library for testing web applications that implements ASGI specification (version 2 and 3). The motiva

    122 Nov 22, 2022
    Faker is a Python package that generates fake data for you.

    Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in yo

    Daniele Faraglia 15.2k Jan 01, 2023
    This repository contains a set of benchmarks of different implementations of Parquet (storage format) <-> Arrow (in-memory format).

    Parquet benchmarks This repository contains a set of benchmarks of different implementations of Parquet (storage format) - Arrow (in-memory format).

    11 Dec 21, 2022
    Tutorial for integrating Oxylabs' Residential Proxies with Selenium

    Oxylabsโ€™ Residential Proxies integration with Selenium Requirements For the integration to work, you'll need to install Selenium on your system. You c

    Oxylabs.io 8 Dec 08, 2022