Skip to main content

Instagram media downloader for public content (reels, posts, profile pictures)

Project description

parth-dl

Instagram Media Downloader for Developers โ€” Download reels, posts, and profile pictures. Public content only. Zero dependencies.

Python Version License Code Style

Built by @parthmax_ โ€ข Zero bloat, pure Python stdlib


๐Ÿ”ฅ Why parth-dl?

Most Instagram downloaders are bloated, outdated, or require authentication. This one doesn't.

  • โœ… Reels with audio โ€” Guaranteed combined streams
  • โœ… Posts (images/videos) โ€” Carousel support included
  • โœ… Profile pictures โ€” High-resolution extraction
  • โœ… Zero dependencies โ€” Pure Python stdlib (no pip hell)
  • โœ… Rate limiting โ€” Built-in protection against IP bans
  • โœ… Retry logic โ€” Exponential backoff on failures
  • โœ… Public only โ€” No login required

โšก Installation

From Source

git clone https://github.com/parthmax2/parth-dl.git
cd parth-dl
pip install -e .

From PyPI (soon)

pip install parth-dl

๐Ÿš€ Usage

CLI

# Download a reel
parth-dl https://www.instagram.com/reel/ABC123/

# Download a post
parth-dl https://www.instagram.com/p/ABC123/

# Download profile picture
parth-dl https://www.instagram.com/username/

# Custom output
parth-dl https://www.instagram.com/reel/ABC123/ -o my_video.mp4

# List formats
parth-dl https://www.instagram.com/reel/ABC123/ --list-formats

# Verbose mode
parth-dl https://www.instagram.com/reel/ABC123/ -v

Python API

from parth_dl import InstagramDownloader

# Initialize
dl = InstagramDownloader(verbose=True)

# Download
dl.download('https://www.instagram.com/reel/ABC123/')

# Get metadata
info = dl.get_info('https://www.instagram.com/reel/ABC123/')
print(info)

Quick function:

from parth_dl import download
download('https://www.instagram.com/reel/ABC123/')

๐Ÿ› ๏ธ Architecture

parth-dl/
โ”œโ”€โ”€ parth_dl/
โ”‚   โ”œโ”€โ”€ __init__.py      # Package entry + exports
โ”‚   โ”œโ”€โ”€ core.py          # Main orchestrator
โ”‚   โ”œโ”€โ”€ extractors.py    # API/GraphQL/Embed/Page extractors
โ”‚   โ”œโ”€โ”€ utils.py         # Security, retry, rate-limit
โ”‚   โ””โ”€โ”€ cli.py           # CLI interface
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ requirements.txt     # (Empty โ€” zero deps!)

Key Features:

  • 4 extraction methods with intelligent fallback
  • Token bucket rate limiter (30 req/60s)
  • Exponential backoff with jitter
  • URL validation to prevent injection
  • Filename sanitization for safe I/O

๐Ÿ”’ Security

  • No external dependencies โ†’ No supply chain attacks
  • URL validation โ†’ Prevents injection
  • Rate limiting โ†’ Avoids IP bans
  • Retry logic โ†’ Handles transient failures
  • Timeout controls โ†’ No hanging requests

โš ๏ธ Disclaimer

For educational and personal use only.

This tool may violate Instagram's Terms of Service. By using it, you accept full responsibility for:

  • Compliance with Instagram ToS
  • Copyright and intellectual property laws
  • Ethical usage

Only download content you have permission to use. Respect creators' rights.


๐Ÿค Contributing

PRs welcome! Follow these steps:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/xyz)
  3. Commit changes (git commit -m 'Add xyz')
  4. Push to branch (git push origin feature/xyz)
  5. Open a PR

๐Ÿ“ License

MIT License โ€” See LICENSE for details.

Provided "as is" without warranty. Instagram may change APIs anytime. Not responsible for misuse.


๐Ÿ“ฌ Connect


Built with โค๏ธ by Parthmax

โญ Star this repo if you found it useful!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parth_dl-1.0.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parth_dl-1.0.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file parth_dl-1.0.0.tar.gz.

File metadata

  • Download URL: parth_dl-1.0.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for parth_dl-1.0.0.tar.gz
Algorithm Hash digest
SHA256 582622e04b88acfce5df8c4834d3560487cacd56b6fb6b8c76ec4281d7195e3b
MD5 7d678ef269ef9ec1d552facbce02ae85
BLAKE2b-256 01ade3378ff6d98caeea501fa59eb1b3f42893c0a8fb5be8db229e3b32875609

See more details on using hashes here.

File details

Details for the file parth_dl-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: parth_dl-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for parth_dl-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51aa07ad9f24cf2c727e9d414d595a7668a5b125fd716eff7972825798f14d0
MD5 86b093fd9e7d6372838bee843bc5a9a2
BLAKE2b-256 9ed9776815086b7541567940f727e53857e74ecaf45266eda0c319c08944222b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page