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 modified env

    Pytest plugin to fail a test if it leaves modified os.environ afterwards.

    wemake.services 7 Sep 11, 2022
    A library for generating fake data and populating database tables.

    Knockoff Factory A library for generating mock data and creating database fixtures that can be used for unit testing. Table of content Installation Ch

    Nike Inc. 30 Sep 23, 2022
    Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.

    Mimesis - Fake Data Generator Description Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes

    Isaak Uchakaev 3.8k Dec 29, 2022
    Spam the buzzer and upgrade automatically - Selenium

    CookieClicker Usage: Let's check your chrome navigator version : Consequently, you have to : download the right chromedriver in the follow link : http

    Iliam Amara 1 Nov 22, 2021
    catsim - Computerized Adaptive Testing Simulator

    catsim - Computerized Adaptive Testing Simulator Quick start catsim is a computerized adaptive testing simulator written in Python 3.4 (with modificat

    Nguyễn Văn Anh Tuấn 1 Nov 29, 2021
    An Instagram bot that can mass text users, receive and read a text, and store it somewhere with user details.

    Instagram Bot 🤖 July 14, 2021 Overview 👍 A multifunctionality automated instagram bot that can mass text users, receive and read a message and store

    Abhilash Datta 14 Dec 06, 2022
    Compiles python selenium script to be a Window's executable

    Problem Statement Setting up a Python project can be frustrating for non-developers. From downloading the right version of python, setting up virtual

    Jerry Ng 8 Jan 09, 2023
    输入Google Hacking语句,自动调用Chrome浏览器爬取结果

    Google-Hacking-Crawler 该脚本可输入Google Hacking语句,自动调用Chrome浏览器爬取结果 环境配置 python -m pip install -r requirements.txt 下载Chrome浏览器

    Jarcis 4 Jun 21, 2022
    This repository contnains sample problems with test cases using Cormen-Lib

    Cormen Lib Sample Problems Description This repository contnains sample problems with test cases using Cormen-Lib. These problems were made for the pu

    Cormen Lib 3 Jun 30, 2022
    A browser automation framework and ecosystem.

    Selenium Selenium is an umbrella project encapsulating a variety of tools and libraries enabling web browser automation. Selenium specifically provide

    Selenium 25.5k Jan 01, 2023
    Tools for test driven data-wrangling and data validation.

    datatest: Test driven data-wrangling and data validation Datatest helps to speed up and formalize data-wrangling and data validation tasks. It impleme

    269 Dec 16, 2022
    fsociety Hacking Tools Pack – A Penetration Testing Framework

    Fsociety Hacking Tools Pack A Penetration Testing Framework, you will have every script that a hacker needs. Works with Python 2. For a Python 3 versi

    Manisso 8.2k Jan 03, 2023
    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
    API mocking with Python.

    apyr apyr (all lowercase) is a simple & easy to use mock API server. It's great for front-end development when your API is not ready, or when you are

    Umut Seven 55 Nov 25, 2022
    No longer maintained, please migrate to model_bakery

    Model Mommy: Smart fixtures for better tests IMPORTANT: Model Mommy is no longer maintained and was replaced by Model Bakery. Please, consider migrati

    Bernardo Fontes 917 Oct 04, 2022
    A library to make concurrent selenium tests that automatically download and setup webdrivers

    AutoParaSelenium A library to make parallel selenium tests that automatically download and setup webdrivers Usage Installation pip install autoparasel

    Ronak Badhe 8 Mar 13, 2022
    pytest plugin for a better developer experience when working with the PyTorch test suite

    pytest-pytorch What is it? pytest-pytorch is a lightweight pytest-plugin that enhances the developer experience when working with the PyTorch test sui

    Quansight 39 Nov 18, 2022
    🎓 Stepik Academy Автоматизация тестирования на Python

    🎓 Stepik Academy Автоматизация тестирования на Python Запуск тестов выполняется в командной строке: pytest -v --tb=line --language=en --alluredir=all

    Sergey 1 Dec 03, 2021
    Generates realistic traffic for load testing tile servers

    Generates realistic traffic for load testing tile servers. Useful for: Measuring throughput, latency and concurrency of your tile serving stack. Ident

    Brandon Liu 23 Dec 05, 2022