1) open cmd
2) type "pip install -U selenium" (If you have pip on your system)
3)Alternately, you can download the source distribution from PyPI (e.g. selenium-4.5.0.tar.gz), unarchive it, and run
python setup.py install
Selenium requires a driver to interface with the chosen browser. Firefox, for example, requires geckodriver, which needs to be installed before the below examples can be run. Make sure it’s in your PATH, e. g., place it in /usr/bin or /usr/local/bin.
Browser | Link |
---|---|
Chrome: |
https://chromedriver.chromium.org/downloads |
Edge: |
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ |
Firefox: |
https://github.com/mozilla/geckodriver/releases |
Safari: |
https://webkit.org/blog/6900/webdriver-support-in-safari-10/ |
This python script can automatically scrape other Instagram users' followers and save them in a text file. Fixed and updated version so it works at today
- Install requirements using terminal or command line. You should run this command
pip install -r requirements.txt
. - Create a .env file in the current directory and add ig username and password as explained in the first comment in run.py
- Open a terminal or cmd again and run the bot using this command:
python run.py
. - Enter the username of the person whose followers you want to scrape.
- Enter how many followers you want to scrape.
- And that's it. After a while, you will find the list of usernames in a text file in the bot folder.