SkillAgentSearch skills...

InstagramScrapper

Python program to scrape all Instagram followers and following data such as name, profile link and image using through your main account

Install / Use

/learn @NyanCyanide/InstagramScrapper

README

Instagram Follower and Following Scraper

Table of Contents

  1. Introduction
  2. Getting Started
  3. Usage
  4. Important Notes
  5. Directory Structure
  6. Example Data
  7. Contributions and Feedback
  8. License

1. Introduction <a name="introduction"></a>

The Instagram Follower and Following Scraper is a Python program that automates the process of scraping follower and following data from Instagram profiles. It uses Selenium for web automation to collect valuable information such as profile names, profile links, profile image links, blue tick presence, and follow-back status.

2. Getting Started <a name="getting-started"></a>

Prerequisites <a name="prerequisites"></a>

Before you begin, make sure you have the following prerequisites:

  • Python 3.x
  • Microsoft Edge browser installed
  • Selenium Python package

Installation <a name="installation"></a>

Follow these steps to set up the project:

  1. Clone or download this repository to your local machine.

  2. Open a terminal or command prompt and navigate to the project directory.

  3. Install the required packages by running:

    pip install -r requirements.txt

3. Usage <a name="usage"></a>

Configuring the config.json File <a name="configuring-the-configjson-file"></a>

Before running the program, configure the config.json file in the ./Modules/ directory. Provide your Instagram username and password (ensure that two-factor authentication is disabled) in the following format:

{
    "username": "username",
    "password": "password"
}

Running the Program <a name="running-the-program"></a>

To run the Instagram Follower and Following Scraper, execute the following command:

python main.py

The program will log in to your Instagram account, scrape the followers and following data, and store it in CSV files.

Scraping Specific User's Followers and Following <a name="scraping-specific-users-followers-and-following"></a>

To scrape a specific user's followers and following, you can mention the usernames in a list format in the python main.py by giving argument users = ["f1", "f2"]. The program will attempt to scrape data for users whose profiles are public or who you are following.

CSV File Format <a name="csv-file-format"></a>

The CSV files generated by the program have the following format:

followers.csv and following.csv

  1. Profile Name: The name of the Instagram user.
  2. Profile Link: The link to the user's Instagram profile.
  3. Profile Image Link: The link to the user's profile image (if available). If it is "False," it means the user has an active story, and the image link cannot be retrieved.
  4. Blue Tick: Either True or False, based on the presence of a blue verification tick on the account.
  5. Follow Back: True if you are following the user; otherwise, False.

4. Important Notes <a name="important-notes"></a>

  • You can run the program multiple times. The program performs a normal login at the start and then saves cookies. For subsequent login attempts, the same cookies are reused, reducing the need for repeated logins.

5. Directory Structure <a name="directory-structure"></a>

  • ./Data/followers: Directory containing followers' CSV files.
  • ./Data/following: Directory containing following CSV files.
  • ./Modules/: Directory containing config.json and cookies.json files.

6. Example Data <a name="example-data"></a>

An example data, "f1" Instagram profile of followers and following has been scraped. You can find the CSV files here:

  • Followers: ./Data/Followers/f1_followers.csv
  • Following: ./Data/Following/f1_following.csv

7. Contributions and Feedback <a name="contributions-and-feedback"></a>

Contributions, suggestions for improvements, and bug reports are always welcomed. Please feel free to open issues or submit pull requests on the project's GitHub repository.

8. License <a name="license"></a>

This project is licensed under the MIT License. You are free to use, modify, and distribute the code as per the terms of the license.

Disclaimer: This project is for educational and informational purposes only. Use it responsibly and in compliance with Instagram's terms of service and policies. The owner of the repository is not responsible for any misuse or violations.

Related Skills

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated22d ago
Forks1

Languages

Python

Security Score

90/100

Audited on Mar 11, 2026

No findings