A convenient way to harvest Reels data without breaking a sweat—or Instagram's TOS
Project description
Reel Scraper
Scrape Instagram Reels data with ease—single or multiple accounts at once—using Python, threading, and a dash of digital sorcery.
Installation • Usage • Classes • Contributing • License • Acknowledgments • Disclaimer
💻 Installation
Reel Scraper requires Python 3.11.9+. Install it from PyPI:
pip install reelscraper
Or clone from GitHub:
git clone https://github.com/andreaaazo/reelscraper.git
cd reelscraper
python -m pip install .
🚀 Usage
Below are two common ways to run the scraper—interactively in Python or via a CLI entry point (if provided).
1. Single Account or Single-Session Scraping
Use the ReelScraper class for scraping a single Instagram account’s Reels.
from reelscraper import ReelScraper
# Initialize with desired settings
scraper = ReelScraper(timeout=30, proxy=None)
# Fetch up to 10 reels for username "someaccount"
reels_data = scraper.get_user_reels("someaccount", max_posts=10)
for reel in reels_data:
print(reel)
2. Multiple Accounts with Concurrency
Use the ReelMultiScraper class to scrape Reels from multiple Instagram accounts in parallel.
from reelscraper import ReelScraper
from reelscraper import ReelMultiScraper
# Initialize a single scraper instance
single_scraper = ReelScraper(timeout=30, proxy=None)
# Initialize the multi-scraper with a text file of usernames, one per line
multi_scraper = ReelMultiScraper(
accounts_file="accounts.txt",
scraper=single_scraper,
max_workers=5 # concurrency level
)
# This returns a dict mapping each username to its list of reels
all_reels = multi_scraper.scrape_accounts()
print(all_reels)
File-based approach: Provide a file named accounts.txt with one username per line:
user1
user2
user3
The code will automatically read these usernames and scrape their Reels in parallel.
🏗 Classes
ReelScraper
- Wraps around
InstagramAPIandExtractorto fetch Reels data. - Methods:
get_user_reels(username, max_posts, max_retries): Gathers Reels for a given username, with optional pagination and retries.
ReelMultiScraper
- Manages scraping multiple accounts in parallel using
ReelScraper(or a subclass) under the hood. - Methods:
scrape_accounts(): Dispatches concurrent requests to scrape each account listed inaccounts.txt(or your chosen file).
🤝 Contributing
We welcome all contributions to make this scraper faster, smarter, or less prone to cosmic errors. To contribute:
- Fork the project.
- Create a new branch.
- Commit your improvements.
- Submit a pull request.
Adding tests, code comments, and a bit of humor in your commit messages is always appreciated!
📄 License
This project is licensed under the MIT License. Feel free to adapt, enhance, or break it—just be kind to fellow developers (and caffeinated beverages).
🙏 Acknowledgments
- Python community for making concurrency and packaging (somewhat) sane.
- Instagram for hosting so many reels and giving us interesting content to scrape—please don’t smite us.
- Coffee (and tea!) for fueling late-night debugging sessions.
⚠ Disclaimer
This project is for educational and personal use. Use it responsibly and within Instagram’s Terms of Service. We do not endorse scraping for malicious or large-scale commercial purposes. When in doubt, show social media platforms the same respect you’d show your grandmother’s cookie jar.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reelscraper-1.1.2.tar.gz.
File metadata
- Download URL: reelscraper-1.1.2.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ddb987bd72f5cff3c63fe703a046c99416a3edc201ba6a33426f67d87d62bc3
|
|
| MD5 |
ea24548ceac5d570cdeeea8673d1731f
|
|
| BLAKE2b-256 |
45ff0756d15078254d3b8f8fac16d0001b0b8cc5b37830dc134432c068b6271f
|
Provenance
The following attestation bundles were made for reelscraper-1.1.2.tar.gz:
Publisher:
pypi-publish.yml on andreaaazo/reelscraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reelscraper-1.1.2.tar.gz -
Subject digest:
2ddb987bd72f5cff3c63fe703a046c99416a3edc201ba6a33426f67d87d62bc3 - Sigstore transparency entry: 160418586
- Sigstore integration time:
-
Permalink:
andreaaazo/reelscraper@9fa8a8bad59f664b0f74828cbb3e542c3ee0456e -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/andreaaazo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@9fa8a8bad59f664b0f74828cbb3e542c3ee0456e -
Trigger Event:
push
-
Statement type:
File details
Details for the file reelscraper-1.1.2-py3-none-any.whl.
File metadata
- Download URL: reelscraper-1.1.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b64cc67dfc972ac71a42c2708168aa4b5a249173a1ea5588b1650e7049ebe574
|
|
| MD5 |
1f031bb4625c8b97509538684fd00c5e
|
|
| BLAKE2b-256 |
0ff85922591f0cb075c7d6e08f4f7ecf3bee9d1729b0adf39b7b065e62bfb810
|
Provenance
The following attestation bundles were made for reelscraper-1.1.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on andreaaazo/reelscraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reelscraper-1.1.2-py3-none-any.whl -
Subject digest:
b64cc67dfc972ac71a42c2708168aa4b5a249173a1ea5588b1650e7049ebe574 - Sigstore transparency entry: 160418590
- Sigstore integration time:
-
Permalink:
andreaaazo/reelscraper@9fa8a8bad59f664b0f74828cbb3e542c3ee0456e -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/andreaaazo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@9fa8a8bad59f664b0f74828cbb3e542c3ee0456e -
Trigger Event:
push
-
Statement type: