Version One

This commit is contained in:
2025-10-28 14:33:24 -04:00
parent e0831295f6
commit 00fa383638
41 changed files with 8835 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
# Instaloader Helper
A small wrapper around Instaloader to download a single Instagram post/reel.
Reference project: instaloader/instaloader (MIT) — https://github.com/instaloader/instaloader
## Setup
```bash
cd tools/instaloader
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
## Login options
- Env vars: `IG_USERNAME`, `IG_PASSWORD`
- Or a session file: `IG_SESSIONFILE` together with `--username`. Create it via:
```bash
instaloader --login YOUR_USERNAME
# After successful login, pass the created session file path via IG_SESSIONFILE or --sessionfile
```
## Usage
```bash
# In the virtualenv
python download_ig.py --url https://www.instagram.com/p/DPujDRJDNov/ --out ./downloads
# or provide username/password via env
IG_USERNAME=... IG_PASSWORD=... python download_ig.py --url https://www.instagram.com/p/.../ --out ./downloads
# or use a session file
IG_SESSIONFILE=/path/to/sessionfile python download_ig.py --url https://www.instagram.com/reel/.../ --username YOUR_USERNAME
```
- Prints the first downloaded `.mp4` path on success.
- Exits with non-zero code if the post is image-only or access is restricted.