Reddit Archive
by @terellison
Download and archive Reddit posts including images, GIFs, and videos from specified users or subreddits with filtering and sorting options.
clawhub install reddit-archiveπ About This Skill
SKILL.md β Reddit Archive
_Download and archive Reddit posts (images, GIFs, videos) from users or subreddits._
Auto-Installation
This script automatically checks for and installs its dependencies on first run:
If missing, it will attempt to install them via pip install --user. You can also:
pip3 install requests yt-dlpexport YTDLP_PATH=/your/custom/path/yt-dlpWhen to Use
You want to archive content from Reddit β either from a specific user (u/username) or a subreddit (r/subname).
Usage
python3 ~/path/to/reddit_archive.py [options]
Options
| Flag | Description | Default |
|------|-------------|---------|
| -u, --user | Reddit username (either this OR --subreddit required) | β |
| -s, --subreddit | Subreddit name (either this OR --user required) | β |
| -o, --output | Output directory | ~/temp/.reddit_ |
| --sort | Sort order: hot, new, rising, top, controversial | hot |
| --time | Time filter for top/controversial: hour, day, week, month, year, all | β |
| --after | Start date (YYYY-MM-DD) | No filter |
| --before | End date (YYYY-MM-DD) | No filter |
| --limit | Max posts to fetch (0 = unlimited) | 0 |
| --images | Download images (jpg, png, webp) | β |
| --gifs | Download GIFs/videos (gfycat, redgifs, imgur) | β |
| --skip-existing | Skip already-downloaded files | β |
| --workers | Parallel download workers | 4 |
Examples
# All posts from a user
python3 reddit_archive.py -u someuserSubreddit with date range
python3 reddit_archive.py -s orlando --after 2025-01-01 --before 2025-12-31Top 10 most upvoted posts of all time from a subreddit
python3 reddit_archive.py -s funny --sort top --time all --limit 10New posts only
python3 reddit_archive.py -s orlando --sort newGIFs only, specific user
python3 reddit_archive.py -u someguy --gifsCustom output dir
python3 reddit_archive.py -u someuser -o ~/Downloads/reddit_archive
Output
Downloads are saved to the output directory with the following structure:
output_directory/
βββ Pictures/
β βββ {target}_{post_id}.jpg
β βββ {target}_{post_id}.png
β βββ ...
βββ Videos/
βββ {target}_{post_id}.mp4
βββ ...
File Organization
The skill is organized as:
reddit-archive/
βββ SKILL.md β This file
βββ scripts/
βββ reddit_archive.py β Main downloader script
βββ requirements.txt β Python dependencies
Rate Limiting
requests with proper User-Agent headerTechnical Notes
/user/{name}/submitted.json or /r/{name}/hot.json)media_metadatayt-dlpcreated_utc)β‘ When to Use
You want to archive content from Reddit β either from a specific user (u/username) or a subreddit (r/subname).
π‘ Examples
# All posts from a user
python3 reddit_archive.py -u someuserSubreddit with date range
python3 reddit_archive.py -s orlando --after 2025-01-01 --before 2025-12-31Top 10 most upvoted posts of all time from a subreddit
python3 reddit_archive.py -s funny --sort top --time all --limit 10New posts only
python3 reddit_archive.py -s orlando --sort newGIFs only, specific user
python3 reddit_archive.py -u someguy --gifsCustom output dir
python3 reddit_archive.py -u someuser -o ~/Downloads/reddit_archive
βοΈ Configuration
| Flag | Description | Default |
|------|-------------|---------|
| -u, --user | Reddit username (either this OR --subreddit required) | β |
| -s, --subreddit | Subreddit name (either this OR --user required) | β |
| -o, --output | Output directory | ~/temp/.reddit_ |
| --sort | Sort order: hot, new, rising, top, controversial | hot |
| --time | Time filter for top/controversial: hour, day, week, month, year, all | β |
| --after | Start date (YYYY-MM-DD) | No filter |
| --before | End date (YYYY-MM-DD) | No filter |
| --limit | Max posts to fetch (0 = unlimited) | 0 |
| --images | Download images (jpg, png, webp) | β |
| --gifs | Download GIFs/videos (gfycat, redgifs, imgur) | β |
| --skip-existing | Skip already-downloaded files | β |
| --workers | Parallel download workers | 4 |
Examples
# All posts from a user
python3 reddit_archive.py -u someuserSubreddit with date range
python3 reddit_archive.py -s orlando --after 2025-01-01 --before 2025-12-31Top 10 most upvoted posts of all time from a subreddit
python3 reddit_archive.py -s funny --sort top --time all --limit 10New posts only
python3 reddit_archive.py -s orlando --sort newGIFs only, specific user
python3 reddit_archive.py -u someguy --gifsCustom output dir
python3 reddit_archive.py -u someuser -o ~/Downloads/reddit_archive