{"id":20051863,"url":"https://github.com/p-ranav/saveddit","last_synced_at":"2025-04-06T19:12:32.206Z","repository":{"id":41484477,"uuid":"354616458","full_name":"p-ranav/saveddit","owner":"p-ranav","description":"Bulk Downloader for Reddit","archived":false,"fork":false,"pushed_at":"2023-06-02T18:31:50.000Z","size":25476,"stargazers_count":180,"open_issues_count":7,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T18:11:12.300Z","etag":null,"topics":["bulk-download","bulk-downloader","downloader","gfycat","image","imgur","imgur-album","imgur-album-downloader","imgur-api","jpg","mp4","png","reddit","reddit-api","redgifs","scraper","video","web-scraping","youtube","youtube-dl"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p-ranav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-04T18:21:59.000Z","updated_at":"2025-03-26T19:41:07.000Z","dependencies_parsed_at":"2025-01-28T22:11:28.618Z","dependency_job_id":"9e83d5d5-0e5a-4a32-8a20-b2ba19c2c782","html_url":"https://github.com/p-ranav/saveddit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsaveddit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsaveddit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsaveddit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsaveddit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-ranav","download_url":"https://codeload.github.com/p-ranav/saveddit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535519,"owners_count":20954576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bulk-download","bulk-downloader","downloader","gfycat","image","imgur","imgur-album","imgur-album-downloader","imgur-api","jpg","mp4","png","reddit","reddit-api","redgifs","scraper","video","web-scraping","youtube","youtube-dl"],"created_at":"2024-11-13T12:07:21.981Z","updated_at":"2025-04-06T19:12:32.182Z","avatar_url":"https://github.com/p-ranav.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height=\"50\" src=\"images/logo.png\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://badge.fury.io/py/saveddit\"\u003e\n    \u003cimg src=\"https://badge.fury.io/py/saveddit.svg\" alt=\"PyPI version\" height=\"18\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/p-ranav/indicators/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"license\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n`saveddit` is a bulk media downloader for reddit\n\n```console\npip3 install saveddit\n```\n\n## Setting up authorization\n\n* [Register an application with Reddit](https://ssl.reddit.com/prefs/apps/)\n  - Write down your client ID and secret from the app\n  - More about Reddit API access [here](https://ssl.reddit.com/wiki/api)\n  - Wiki page about Reddit OAuth2 applications [here](https://github.com/reddit-archive/reddit/wiki/OAuth2)\n\n\u003cp align=\"left\"\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003cimg height=\"300\" src=\"images/reddit_app.png\"/\u003e\n\u003c/p\u003e\n\n* [Register an application with Imgur](https://api.imgur.com/oauth2/addclient)\n  - Write down the Imgur client ID from the app\n\n\u003cp align=\"left\"\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003cimg height=\"600\" src=\"images/imgur_app.png\"/\u003e\n\u003c/p\u003e\n\nThese registrations will authorize you to use the Reddit and Imgur APIs to download publicly available information.\n\n## User configuration\n\nThe first time you run `saveddit`, you will see something like this:\n\n```console\nfoo@bar:~$ saveddit\nRetrieving configuration from ~/.saveddit/user_config.yaml file\nNo configuration file found.\nCreating one. Would you like to edit it now?\n\u003e Choose Y for yes and N for no\n```\n\nOnce you choose 'yes', the program will request you to enter these credentials:\n- Your imgur client ID\n- Your reddit client ID\n- Your reddit client secret\n- Your reddit username\n\nIn case you choose 'no', the program will create a file which you can edit later, this is how to edit it:\n\n* Open the generated `~/.saveddit/user_config.yaml`\n* Update the client IDs and secrets from the previous step\n* If you plan on using the `user` API, add your reddit username as well\n\n```yaml\nimgur_client_id: '\u003cYOUR_IMGUR_CLIENT_ID\u003e'\nreddit_client_id: '\u003cYOUR_REDDIT_CLIENT_ID\u003e'\nreddit_client_secret: '\u003cYOUR_REDDIT_CLIENT_SECRET\u003e'\nreddit_username: '\u003cYOUR_REDDIT_USERNAME\u003e'\n```\n\n## Download from Subreddit\n\n```console\nfoo@bar:~$ saveddit subreddit -h\nRetrieving configuration from /Users/pranav/.saveddit/user_config.yaml file\n\nusage: saveddit subreddit [-h] [-f categories [categories ...]] [-l post_limit] [--skip-comments] [--skip-meta] [--skip-videos] -o output_path subreddits [subreddits ...]\n\npositional arguments:\n  subreddits            Names of subreddits to download, e.g., AskReddit\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -f categories [categories ...]\n                        Categories of posts to download (default: ['hot', 'new', 'rising', 'controversial', 'top', 'gilded'])\n  -l post_limit         Limit the number of submissions downloaded in each category (default: None, i.e., all submissions)\n  --skip-comments       When true, saveddit will not save comments to a comments.json file\n  --skip-meta           When true, saveddit will not save meta to a submission.json file on submissions\n  --skip-videos         When true, saveddit will not download videos (e.g., gfycat, redgifs, youtube, v.redd.it links)\n  --all-comments        When true, saveddit will download all the comments in a post instead of just downloading the top ones.)\n  -o output_path        Directory where saveddit will save downloaded content\n```\n\n```console\nfoo@bar:~$ saveddit subreddit pics -f hot -l 5 -o ~/Desktop\n```\n\n```console\nfoo@bar:~$ tree -L 4 ~/Desktop/www.reddit.com\n/Users/pranav/Desktop/www.reddit.com\n└── r\n    └── pics\n        └── hot\n            ├── 000_Prince_Philip_Duke_of_Edinburgh_...\n            ├── 001_Day_10_of_Nobody_Noticing_the_Ap...\n            ├── 002_First_edited_picture\n            ├── 003_Reorganized_a_few_months_ago_and...\n            └── 004_Van_Gogh_inspired_rainy_street_I...\n```\n\nYou can download from multiple subreddits and use multiple filters:\n\n```console\nfoo@bar:~$ saveddit subreddit funny AskReddit -f hot top new rising -l 5 -o ~/Downloads/Reddit/.\n```\n\nThe downloads from each subreddit to go to a separate folder like so:\n\n```console\nfoo@bar:~$ tree -L 3 ~/Downloads/Reddit/www.reddit.com\n/Users/pranav/Downloads/Reddit/www.reddit.com\n└── r\n    ├── AskReddit\n    │   ├── hot\n    │   ├── new\n    │   ├── rising\n    │   └── top\n    └── funny\n        ├── hot\n        ├── new\n        ├── rising\n        └── top\n```\n\n## Download from anonymous Multireddit\n\nTo download from an anonymous multireddit, use the `multireddit` option and pass a number of subreddit names\n\n```console\nfoo@bar:~$ saveddit multireddit -h\nusage: saveddit multireddit [-h] [-f categories [categories ...]] [-l post_limit] [--skip-comments] [--skip-meta] [--skip-videos] -o output_path subreddits [subreddits ...]\n\npositional arguments:\n  subreddits            Names of subreddits to download, e.g., aww, pics. The downloads will be stored in \u003cOUTPUT_PATH\u003e/www.reddit.com/m/aww+pics/.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -f categories [categories ...]\n                        Categories of posts to download (default: ['hot', 'new', 'random_rising', 'rising', 'controversial', 'top', 'gilded'])\n  -l post_limit         Limit the number of submissions downloaded in each category (default: None, i.e., all submissions)\n  --skip-comments       When true, saveddit will not save comments to a comments.json file\n  --skip-meta           When true, saveddit will not save meta to a submission.json file on submissions\n  --skip-videos         When true, saveddit will not download videos (e.g., gfycat, redgifs, youtube, v.redd.it links)\n  -o output_path        Directory where saveddit will save downloaded content\n```\n\n```console\nfoo@bar:~$ saveddit multireddit EarthPorn NaturePics -f hot -l 5 -o ~/Desktop\n```\n\nAnonymous multireddits are saved in `www.reddit.com/m/\u003cMultireddit_names\u003e/\u003ccategory\u003e/` like so:\n\n```console\ntree -L 4 ~/Desktop/www.reddit.com\n/Users/pranav/Desktop/www.reddit.com\n└── m\n    └── EarthPorn+NaturePics\n        └── hot\n            ├── 000_Banning_State_Park_Minnesota_OC_...\n            ├── 001_Misty_forest_in_the_mountains_of...\n            ├── 002_One_of_the_highlights_of_my_last...\n            ├── 003__OC_Japan_Kyoto_Garden_of_the_Go...\n            └── 004_Sunset_at_Mt_Rainier_National_Pa...\n```\n\n## Download from User's page\n\n```console\nfoo@bar:~$ saveddit user -h\nusage: saveddit user [-h] users [users ...] {saved,gilded,submitted,multireddits,upvoted,comments} ...\n\npositional arguments:\n  users                 Names of users to download, e.g., Poem_for_your_sprog\n  {saved,gilded,submitted,multireddits,upvoted,comments}\n\noptional arguments:\n  -h, --help            show this help message and exit\n```\n\nHere's a usage example for downloading all comments made by `Poem_for_your_sprog`\n\n```console\nfoo@bar:~$ saveddit user \"Poem_for_your_sprog\" comments -s top -l 5 -o ~/Desktop\n```\n\nHere's another example for downloading `kemitche`'s multireddits:\n\n```console\nfoo@bar:~$ saveddit user kemitche multireddits -n reddit -f hot -l 5 -o ~/Desktop\n```\n\nUser-specific content is downloaded to `www.reddit.com/u/\u003cUsername\u003e/...` like so:\n\n```console\nfoo@bar:~$ tree ~/Desktop/www.reddit.com\n/Users/pranav/Desktop/www.reddit.com\n└── u\n    ├── Poem_for_your_sprog\n    │   ├── comments\n    │   │   └── top\n    │   │       ├── 000_Comment_my_name_is_Cow_and_wen_its_ni....json\n    │   │       ├── 001_Comment_It_stopped_at_six_and_life....json\n    │   │       ├── 002_Comment__Perhaps_I_could_listen_to_podca....json\n    │   │       ├── 003_Comment__I_don_t_have_regret_for_the_thi....json\n    │   │       └── 004_Comment__So_throw_off_the_chains_of_oppr....json\n    │   └── user.json\n    └── kemitche\n        ├── m\n        │   └── reddit\n        │       └── hot\n        │           ├── 000_When_posting_to_my_u_channel_NSF...\n        │           │   ├── comments.json\n        │           │   └── submission.json\n        │           ├── 001_How_to_remove_popular_near_you\n        │           │   ├── comments.json\n        │           │   └── submission.json\n        │           ├── 002__IOS_2021_13_0_Reddit_is_just_su...\n        │           │   ├── comments.json\n        │           │   └── submission.json\n        │           ├── 003_The_Approve_User_button_should_n...\n        │           │   ├── comments.json\n        │           │   └── submission.json\n        │           └── 004_non_moderators_unable_to_view_su...\n        │               ├── comments.json\n        │               └── submission.json\n        └── user.json\n```\n\n## Search and Download\n\n`saveddit` support searching subreddits and downloading search results\n\n```console\nfoo@bar:~$ saveddit search -h\nusage: saveddit search [-h] -q query [-s sort] [-t time_filter] [--include-nsfw] [--skip-comments] [--skip-meta] [--skip-videos] -o output_path subreddits [subreddits ...]\n\npositional arguments:\n  subreddits       Names of subreddits to search, e.g., all, aww, pics\n\noptional arguments:\n  -h, --help       show this help message and exit\n  -q query         Search query string\n  -s sort          Sort to apply on search (default: relevance, choices: [relevance, hot, top, new, comments])\n  -t time_filter   Time filter to apply on search (default: all, choices: [all, day, hour, month, week, year])\n  --include-nsfw   When true, saveddit will include NSFW results in search\n  --skip-comments  When true, saveddit will not save comments to a comments.json file\n  --skip-meta      When true, saveddit will not save meta to a submission.json file on submissions\n  --skip-videos    When true, saveddit will not download videos (e.g., gfycat, redgifs, youtube, v.redd.it links)\n  -o output_path   Directory where saveddit will save downloaded content\n```\n\ne.g.,\n\n```console\nfoo@bar:~$ saveddit search soccer -q \"Chelsea\" -o ~/Desktop\n```\n\nThe downloaded search results are stored in `www.reddit.com/q/\u003csearch_query\u003e/\u003csubreddits\u003e/\u003csort\u003e/.`\n\n```console\nfoo@bar:~$ tree -L 4 ~/Desktop/www.reddit.com/q\n/Users/pranav/Desktop/www.reddit.com/q\n└── Chelsea\n    └── soccer\n        └── relevance\n            ├── 000__Official_Results_for_UEFA_Champ...\n            ├── 001_Porto_0_1_Chelsea_Mason_Mount_32...\n            ├── 002_Crystal_Palace_0_2_Chelsea_Chris...\n            ├── 003_Post_Match_Thread_Chelsea_2_5_We...\n            ├── 004_Match_Thread_Porto_vs_Chelsea_UE...\n            ├── 005_Crystal_Palace_1_4_Chelsea_Chris...\n            ├── 006_Porto_0_2_Chelsea_Ben_Chilwell_8...\n            ├── 007_Post_Match_Thread_Porto_0_2_Chel...\n            ├── 008_UCL_Quaterfinalists_are_Bayern_D...\n            ├── 009__MD_Mino_Raiola_and_Haaland_s_fa...\n            ├── 010_Chelsea_2_5_West_Brom_Callum_Rob...\n            ├── 011_Chelsea_1_2_West_Brom_Matheus_Pe...\n            ├── 012__Bild_Sport_via_Sport_Witness_Ch...\n            ├── 013_Match_Thread_Chelsea_vs_West_Bro...\n            ├── 014_Chelsea_1_3_West_Brom_Callum_Rob...\n            ├── 015_Match_Thread_Chelsea_vs_Atletico...\n            ├── 016_Stefan_Savi�\\207_Atlético_Madrid_str...\n            ├── 017_Chelsea_1_0_West_Brom_Christian_...\n            └── 018_Alvaro_Morata_I_ve_never_had_dep...\n```\n\n## Supported Links:\n\n* Direct links to images or videos, e.g., `.png`, `.jpg`, `.mp4`, `.gif` etc.\n* Reddit galleries `reddit.com/gallery/...`\n* Reddit videos `v.redd.it/...`\n* Gfycat links `gfycat.com/...`\n* Redgif links `redgifs.com/...`\n* Imgur images `imgur.com/...`\n* Imgur albums `imgur.com/a/...` and `imgur.com/gallery/...`\n* Youtube links `youtube.com/...` and `yout.be/...`\n* These [sites](https://ytdl-org.github.io/youtube-dl/supportedsites.html) supported by `youtube-dl`\n* Self posts\n* For all other cases, `saveddit` will simply fetch the HTML of the URL\n\n## Contributing\nContributions are welcome, have a look at the [CONTRIBUTING.md](CONTRIBUTING.md) document for more information.\n\n## License\nThe project is available under the [MIT](https://opensource.org/licenses/MIT) license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-ranav%2Fsaveddit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-ranav%2Fsaveddit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-ranav%2Fsaveddit/lists"}