Skip to content

A simple tool for downloading photos from Instagram profiles using Selenium with Microsoft Edge. Bypasses common Instagram rate limits more reliably than API-based approachesHarder to detect than simple HTTP scraping

License

Notifications You must be signed in to change notification settings

TsvetanG2/InstagramPostScrapper

Repository files navigation

Python License Platform Download

Latest Update 0.0.2v:

  • New method _is_challenge_page() — more reliable recognition of captcha/challenge pages through URL checks + DOM selectors (instead of simply searching the page source)
  • Human-like scrolling — instead of directly scrolling to the bottom:
  • Scrolls in random steps (50-90% of viewport)
  • Sometimes scrolls up (simulates reading)
  • Random pauses between 2-5 seconds
  • Better detection of profile end — 5 retries with scroll up/down before stopping (instead of 1 attempt)
  • Challenge detection when scrolling — check every 10 scrolls for rate limit
  • Improved carousel retry — additional retry for duplicate URL + skip if the slide is blocked
  • Longer initial waits — 4-7s when opening a profile (was 3-5s)

Instagram Scraper

A simple tool for downloading photos from Instagram profiles using Selenium with Microsoft Edge.

Method: Selenium + Edge (recommended)

File: scraper_selenium.py

Prerequisites

  • Python 3.10+
  • Microsoft Edge installed
  • On Linux, you may need the python3-tk package for the GUI (tkinter is not always included by default).

Advantages

  • Bypasses common Instagram rate limits more reliably than API-based approaches
  • Harder to detect than simple HTTP scraping (uses a real browser)
  • Can keep working even after temporary 429/rate-limit blocks
  • You can see what the browser is doing (or run headless)
  • Uses Microsoft Edge (no ChromeDriver required if Edge WebDriver is available on your system)

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Run:
python scraper_selenium.py

Usage notes

  • Instagram changes often. If something breaks, update Selenium/Edge and retry.
  • If you want headless mode, enable it in the script (search for headless options).

Disclaimer

Use responsibly and comply with Instagram's Terms of Service and applicable laws.

Pyinstaller installation for .exe file

python -m PyInstaller --onedir --windowed --name "InstagramScrapper" --icon "icon.ico" --version-file "version_info.txt" --add-data "icon.ico;." --collect-all selenium --hidden-import selenium.webdriver --hidden-import selenium.webdriver.common --hidden-import selenium.webdriver.support scraper_selenium.py

About

A simple tool for downloading photos from Instagram profiles using Selenium with Microsoft Edge. Bypasses common Instagram rate limits more reliably than API-based approachesHarder to detect than simple HTTP scraping

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published