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.
First of all this bot uses Python so if you don't have it installed in your machine follow this steps:
- If you are on windows:
click on Python and download the latest version.- 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
- Set up venv:
python3 -m venv venv
- 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
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
type scrape to start scraping and provide the informations needed
- Scraping
Once the test has started it will ask you if you want to scrape or automate your followers lists
When done scraping you will see
- 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
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.
- 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.
>- When using the same account multiple times instagram notices that your doing an automation with your account and will popup a 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.