Skip to content

AymaneImr/instagram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

instagram-bot

Instagram-bot can automates the scraping of followers and following lists, extracts personal account information, and provides tools to clean and manage followers and following lists efficiently. Perfect for enhancing account management and maintaining a curated social media presence.

Installation needed

First of all this bot uses Python so if you don't have it installed in your machine follow this steps:

  1. If you are on windows:
    click on Python and download the latest version.
  2. If you are on linux:
    sudo apt install python3

After you successfully downloaded python in your machine install those 2 packages:

  • pip3 install seleniumbase
  • pip3 install pandas

If you don't have python3 in your machine use pip

  • HINT:
    If you faced any problems during seleniumbase instalation i recommend using virtual enviroment, to set up a venv follow the next steps:
    Before you set up venv if you are on linux you need to download this package --> sudo apt install python3.10-venv
  1. Set up venv:
    python3 -m venv venv

  2. Activate venv:
  • If you are on windows:
    try this --> venv\Scripts\activate
    if it didn't work try --> venv\Scripts\activate.bat
  • If you are on linux:
    source venv/bin/activate

Usage

First step make sure you're in the correct working directory, something like that should appear:
(venv) ~/Desktop/instagram-bot$
After that run the following command to start your bot working:

  • pytest -k "test_start" -s
  • HINT
    Use --headed or --gui to disable headless chrome browser
  • Scraping
    Once the test has started it will ask you if you want to scrape or automate your followers lists

start-scraping

type scrape to start scraping and provide the informations needed
When done scraping you will see

test_passed

  • Automating
    To start automating simply type followers from the previous example, then it will ask you for your account's username and password to login to your account and do the job.
    After that it will ask you which list you want to clean in your instagram account type following or followers choose-one
  • If you would like to not unfollow or remove someone from your lists to Remain sipmly provide their account's username in this structure account1,account2,account3,account4
    each account should be separated with a comma only and with no spaces in between
    And there you go the bot is doing his job

Note!

  • Using public scraping may not work all the time due to some instagram detection. That's because instagram sometimes doesn't allow when you're trying to take a look into an account using only link without login.

Something went wrong

It's preferred to use private scraping over public scraping due to it's efficiency and getting tasks done > Choosing private scraping will ask you for your instagram username(not email or phone number) & password to login to your account.

>- When using the same account multiple times instagram notices that your doing an automation with your account and will popup a captcha.

captcha

If the captcha poped up you will get an Exception says ***Login to your account and Try solving captcha manually.*** Then you can keep your scraping tasks.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages