All Projects β†’ p-ranav β†’ saveddit

p-ranav / saveddit

Licence: MIT license
Bulk Downloader for Reddit

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to saveddit

Liked-Saved-Image-Downloader
Save content you enjoy!
Stars: ✭ 80 (-38.46%)
Mutual labels:  downloader, reddit, imgur, gfycat
rreddit
π«βŸ‹ Get Reddit data
Stars: ✭ 49 (-62.31%)
Mutual labels:  reddit, reddit-api, web-scraping
Ripme
Downloads albums in bulk
Stars: ✭ 2,748 (+2013.85%)
Mutual labels:  downloader, reddit, imgur
tootbot
Python tool for mirroring Reddit posts to Twitter and Mastodon
Stars: ✭ 68 (-47.69%)
Mutual labels:  reddit, imgur, gfycat
Redditdownloader
Scrapes Reddit to download media of your choice.
Stars: ✭ 521 (+300.77%)
Mutual labels:  scraper, downloader, reddit
SmartImage
Reverse image search tool (SauceNao, ImgOps, trace.moe, and more)
Stars: ✭ 346 (+166.15%)
Mutual labels:  reddit, imgur
nipper
🌢 πŸ’½ Nipper - Youtube playlist (& video) ripper
Stars: ✭ 23 (-82.31%)
Mutual labels:  downloader, mp4
youtube-downloader-python
You can download the YouTube video for free and convert it to any extension you want.
Stars: ✭ 20 (-84.62%)
Mutual labels:  downloader, youtube-dl
oculante
A minimalistic crossplatform image viewer written in rust
Stars: ✭ 169 (+30%)
Mutual labels:  jpg, png
node-express-reddit-clone
Build a Node, Express and MySQL-based clone of Reddit for DecodeMTL web development bootcamp
Stars: ✭ 28 (-78.46%)
Mutual labels:  reddit, reddit-api
save-html-as-image
Download the HTML (DOM) to Image (JPG, PNG)
Stars: ✭ 26 (-80%)
Mutual labels:  jpg, png
fansly
Simply scrape / download all the media from an fansly account
Stars: ✭ 351 (+170%)
Mutual labels:  scraper, downloader
lopez
Crawling and scraping the Web for fun and profit
Stars: ✭ 20 (-84.62%)
Mutual labels:  scraper, web-scraping
vscode-mediaplayer
Mediaplayer extention for VS Code
Stars: ✭ 18 (-86.15%)
Mutual labels:  mp4, youtube-dl
Website-downloader
πŸ’‘ Download the complete source code of any website (including all assets). [ Javascripts, Stylesheets, Images ] using Node.js
Stars: ✭ 615 (+373.08%)
Mutual labels:  scraper, downloader
reddit-image-fetcher
A JavaScript package for fetching reddit images, memes, wallpapers and more.
Stars: ✭ 40 (-69.23%)
Mutual labels:  reddit, reddit-api
cat-message
Finds cat images/videos/gifs on reddit, sends them to my mom via applescript
Stars: ✭ 35 (-73.08%)
Mutual labels:  scraper, reddit
BookingScraper
🌎 🏨 Scrape Booking.com 🏨 🌎
Stars: ✭ 68 (-47.69%)
Mutual labels:  scraper, web-scraping
xaringanBuilder
An R package for building xaringan slides into multiple outputs, including html, pdf, png, gif, pptx, and mp4.
Stars: ✭ 157 (+20.77%)
Mutual labels:  png, mp4
Imgur.API
Imgur.API is a .NET implementation of Imgur's API.
Stars: ✭ 39 (-70%)
Mutual labels:  imgur, imgur-api

PyPI version license

saveddit is a bulk media downloader for reddit

pip3 install saveddit

Setting up authorization

        

        

These registrations will authorize you to use the Reddit and Imgur APIs to download publicly available information.

User configuration

The first time you run saveddit, you will see something like this:

foo@bar:~$ saveddit
Retrieving configuration from ~/.saveddit/user_config.yaml file
No configuration file found.
Creating one. Would you like to edit it now?
> Choose Y for yes and N for no

Once you choose 'yes', the program will request you to enter these credentials:

  • Your imgur client ID
  • Your reddit client ID
  • Your reddit client secret
  • Your reddit username

In case you choose 'no', the program will create a file which you can edit later, this is how to edit it:

  • Open the generated ~/.saveddit/user_config.yaml
  • Update the client IDs and secrets from the previous step
  • If you plan on using the user API, add your reddit username as well
imgur_client_id: '<YOUR_IMGUR_CLIENT_ID>'
reddit_client_id: '<YOUR_REDDIT_CLIENT_ID>'
reddit_client_secret: '<YOUR_REDDIT_CLIENT_SECRET>'
reddit_username: '<YOUR_REDDIT_USERNAME>'

Download from Subreddit

foo@bar:~$ saveddit subreddit -h
Retrieving configuration from /Users/pranav/.saveddit/user_config.yaml file

usage: saveddit subreddit [-h] [-f categories [categories ...]] [-l post_limit] [--skip-comments] [--skip-meta] [--skip-videos] -o output_path subreddits [subreddits ...]

positional arguments:
  subreddits            Names of subreddits to download, e.g., AskReddit

optional arguments:
  -h, --help            show this help message and exit
  -f categories [categories ...]
                        Categories of posts to download (default: ['hot', 'new', 'rising', 'controversial', 'top', 'gilded'])
  -l post_limit         Limit the number of submissions downloaded in each category (default: None, i.e., all submissions)
  --skip-comments       When true, saveddit will not save comments to a comments.json file
  --skip-meta           When true, saveddit will not save meta to a submission.json file on submissions
  --skip-videos         When true, saveddit will not download videos (e.g., gfycat, redgifs, youtube, v.redd.it links)
  --all-comments        When true, saveddit will download all the comments in a post instead of just downloading the top ones.)
  -o output_path        Directory where saveddit will save downloaded content
foo@bar:~$ saveddit subreddit pics -f hot -l 5 -o ~/Desktop
foo@bar:~$ tree -L 4 ~/Desktop/www.reddit.com
/Users/pranav/Desktop/www.reddit.com
└── r
    └── pics
        └── hot
            β”œβ”€β”€ 000_Prince_Philip_Duke_of_Edinburgh_...
            β”œβ”€β”€ 001_Day_10_of_Nobody_Noticing_the_Ap...
            β”œβ”€β”€ 002_First_edited_picture
            β”œβ”€β”€ 003_Reorganized_a_few_months_ago_and...
            └── 004_Van_Gogh_inspired_rainy_street_I...

You can download from multiple subreddits and use multiple filters:

foo@bar:~$ saveddit subreddit funny AskReddit -f hot top new rising -l 5 -o ~/Downloads/Reddit/.

The downloads from each subreddit to go to a separate folder like so:

foo@bar:~$ tree -L 3 ~/Downloads/Reddit/www.reddit.com
/Users/pranav/Downloads/Reddit/www.reddit.com
└── r
    β”œβ”€β”€ AskReddit
    β”‚   β”œβ”€β”€ hot
    β”‚   β”œβ”€β”€ new
    β”‚   β”œβ”€β”€ rising
    β”‚   └── top
    └── funny
        β”œβ”€β”€ hot
        β”œβ”€β”€ new
        β”œβ”€β”€ rising
        └── top

Download from anonymous Multireddit

To download from an anonymous multireddit, use the multireddit option and pass a number of subreddit names

foo@bar:~$ saveddit multireddit -h
usage: saveddit multireddit [-h] [-f categories [categories ...]] [-l post_limit] [--skip-comments] [--skip-meta] [--skip-videos] -o output_path subreddits [subreddits ...]

positional arguments:
  subreddits            Names of subreddits to download, e.g., aww, pics. The downloads will be stored in <OUTPUT_PATH>/www.reddit.com/m/aww+pics/.

optional arguments:
  -h, --help            show this help message and exit
  -f categories [categories ...]
                        Categories of posts to download (default: ['hot', 'new', 'random_rising', 'rising', 'controversial', 'top', 'gilded'])
  -l post_limit         Limit the number of submissions downloaded in each category (default: None, i.e., all submissions)
  --skip-comments       When true, saveddit will not save comments to a comments.json file
  --skip-meta           When true, saveddit will not save meta to a submission.json file on submissions
  --skip-videos         When true, saveddit will not download videos (e.g., gfycat, redgifs, youtube, v.redd.it links)
  -o output_path        Directory where saveddit will save downloaded content
foo@bar:~$ saveddit multireddit EarthPorn NaturePics -f hot -l 5 -o ~/Desktop

Anonymous multireddits are saved in www.reddit.com/m/<Multireddit_names>/<category>/ like so:

tree -L 4 ~/Desktop/www.reddit.com
/Users/pranav/Desktop/www.reddit.com
└── m
    └── EarthPorn+NaturePics
        └── hot
            β”œβ”€β”€ 000_Banning_State_Park_Minnesota_OC_...
            β”œβ”€β”€ 001_Misty_forest_in_the_mountains_of...
            β”œβ”€β”€ 002_One_of_the_highlights_of_my_last...
            β”œβ”€β”€ 003__OC_Japan_Kyoto_Garden_of_the_Go...
            └── 004_Sunset_at_Mt_Rainier_National_Pa...

Download from User's page

foo@bar:~$ saveddit user -h
usage: saveddit user [-h] users [users ...] {saved,gilded,submitted,multireddits,upvoted,comments} ...

positional arguments:
  users                 Names of users to download, e.g., Poem_for_your_sprog
  {saved,gilded,submitted,multireddits,upvoted,comments}

optional arguments:
  -h, --help            show this help message and exit

Here's a usage example for downloading all comments made by Poem_for_your_sprog

foo@bar:~$ saveddit user "Poem_for_your_sprog" comments -s top -l 5 -o ~/Desktop

Here's another example for downloading kemitche's multireddits:

foo@bar:~$ saveddit user kemitche multireddits -n reddit -f hot -l 5 -o ~/Desktop

User-specific content is downloaded to www.reddit.com/u/<Username>/... like so:

foo@bar:~$ tree ~/Desktop/www.reddit.com
/Users/pranav/Desktop/www.reddit.com
└── u
    β”œβ”€β”€ Poem_for_your_sprog
    β”‚   β”œβ”€β”€ comments
    β”‚   β”‚   └── top
    β”‚   β”‚       β”œβ”€β”€ 000_Comment_my_name_is_Cow_and_wen_its_ni....json
    β”‚   β”‚       β”œβ”€β”€ 001_Comment_It_stopped_at_six_and_life....json
    β”‚   β”‚       β”œβ”€β”€ 002_Comment__Perhaps_I_could_listen_to_podca....json
    β”‚   β”‚       β”œβ”€β”€ 003_Comment__I_don_t_have_regret_for_the_thi....json
    β”‚   β”‚       └── 004_Comment__So_throw_off_the_chains_of_oppr....json
    β”‚   └── user.json
    └── kemitche
        β”œβ”€β”€ m
        β”‚   └── reddit
        β”‚       └── hot
        β”‚           β”œβ”€β”€ 000_When_posting_to_my_u_channel_NSF...
        β”‚           β”‚   β”œβ”€β”€ comments.json
        β”‚           β”‚   └── submission.json
        β”‚           β”œβ”€β”€ 001_How_to_remove_popular_near_you
        β”‚           β”‚   β”œβ”€β”€ comments.json
        β”‚           β”‚   └── submission.json
        β”‚           β”œβ”€β”€ 002__IOS_2021_13_0_Reddit_is_just_su...
        β”‚           β”‚   β”œβ”€β”€ comments.json
        β”‚           β”‚   └── submission.json
        β”‚           β”œβ”€β”€ 003_The_Approve_User_button_should_n...
        β”‚           β”‚   β”œβ”€β”€ comments.json
        β”‚           β”‚   └── submission.json
        β”‚           └── 004_non_moderators_unable_to_view_su...
        β”‚               β”œβ”€β”€ comments.json
        β”‚               └── submission.json
        └── user.json

Search and Download

saveddit support searching subreddits and downloading search results

foo@bar:~$ saveddit search -h
usage: saveddit search [-h] -q query [-s sort] [-t time_filter] [--include-nsfw] [--skip-comments] [--skip-meta] [--skip-videos] -o output_path subreddits [subreddits ...]

positional arguments:
  subreddits       Names of subreddits to search, e.g., all, aww, pics

optional arguments:
  -h, --help       show this help message and exit
  -q query         Search query string
  -s sort          Sort to apply on search (default: relevance, choices: [relevance, hot, top, new, comments])
  -t time_filter   Time filter to apply on search (default: all, choices: [all, day, hour, month, week, year])
  --include-nsfw   When true, saveddit will include NSFW results in search
  --skip-comments  When true, saveddit will not save comments to a comments.json file
  --skip-meta      When true, saveddit will not save meta to a submission.json file on submissions
  --skip-videos    When true, saveddit will not download videos (e.g., gfycat, redgifs, youtube, v.redd.it links)
  -o output_path   Directory where saveddit will save downloaded content

e.g.,

foo@bar:~$ saveddit search soccer -q "Chelsea" -o ~/Desktop

The downloaded search results are stored in www.reddit.com/q/<search_query>/<subreddits>/<sort>/.

foo@bar:~$ tree -L 4 ~/Desktop/www.reddit.com/q
/Users/pranav/Desktop/www.reddit.com/q
└── Chelsea
    └── soccer
        └── relevance
            β”œβ”€β”€ 000__Official_Results_for_UEFA_Champ...
            β”œβ”€β”€ 001_Porto_0_1_Chelsea_Mason_Mount_32...
            β”œβ”€β”€ 002_Crystal_Palace_0_2_Chelsea_Chris...
            β”œβ”€β”€ 003_Post_Match_Thread_Chelsea_2_5_We...
            β”œβ”€β”€ 004_Match_Thread_Porto_vs_Chelsea_UE...
            β”œβ”€β”€ 005_Crystal_Palace_1_4_Chelsea_Chris...
            β”œβ”€β”€ 006_Porto_0_2_Chelsea_Ben_Chilwell_8...
            β”œβ”€β”€ 007_Post_Match_Thread_Porto_0_2_Chel...
            β”œβ”€β”€ 008_UCL_Quaterfinalists_are_Bayern_D...
            β”œβ”€β”€ 009__MD_Mino_Raiola_and_Haaland_s_fa...
            β”œβ”€β”€ 010_Chelsea_2_5_West_Brom_Callum_Rob...
            β”œβ”€β”€ 011_Chelsea_1_2_West_Brom_Matheus_Pe...
            β”œβ”€β”€ 012__Bild_Sport_via_Sport_Witness_Ch...
            β”œβ”€β”€ 013_Match_Thread_Chelsea_vs_West_Bro...
            β”œβ”€β”€ 014_Chelsea_1_3_West_Brom_Callum_Rob...
            β”œβ”€β”€ 015_Match_Thread_Chelsea_vs_Atletico...
            β”œβ”€β”€ 016_Stefan_SaviοΏ½\207_AtlΓ©tico_Madrid_str...
            β”œβ”€β”€ 017_Chelsea_1_0_West_Brom_Christian_...
            └── 018_Alvaro_Morata_I_ve_never_had_dep...

Supported Links:

  • Direct links to images or videos, e.g., .png, .jpg, .mp4, .gif etc.
  • Reddit galleries reddit.com/gallery/...
  • Reddit videos v.redd.it/...
  • Gfycat links gfycat.com/...
  • Redgif links redgifs.com/...
  • Imgur images imgur.com/...
  • Imgur albums imgur.com/a/... and imgur.com/gallery/...
  • Youtube links youtube.com/... and yout.be/...
  • These sites supported by youtube-dl
  • Self posts
  • For all other cases, saveddit will simply fetch the HTML of the URL

Contributing

Contributions are welcome, have a look at the CONTRIBUTING.md document for more information.

License

The project is available under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].