← Back to projects

instagram-scanner [completed]

Instagram Scanner: from browser session to local comparison

A Python automation project for comparing an Instagram account’s followers and following, with local data outputs.

  • Python
  • Playwright
  • Requests
  • JSON
Source for instagram-scanner
  1. Saved browser session
  2. Paginated follower lists
  3. Local comparison + files

Problem

Comparing followers and following manually is repetitive. This project explores a local workflow that retrieves both lists and identifies usernames present in one but not the other.

Approach

Playwright starts a browser with saved session state. Helpers read displayed counts, extract cookies and a request header, then use Requests to paginate followers and following. The workflow writes JSON as it collects records, compares usernames in both directions, and saves profile links to local text files.

Engineering trade-off

Reusing a browser session avoids embedding a password in the script, but saved state and outputs remain sensitive account data. Private web endpoints, page text, and embedded headers are fragile dependencies. Partial fetches or changing lists can distort the comparison; these files are not a complete account audit.

Evidence

The driver and helpers show session bootstrap, pagination, local output, and comparison logic. Review was source-only: no Instagram automation was executed and no account data was collected. Present-day compatibility and completeness have not been revalidated; this is not an official Instagram integration.