UpvoteDownloader allows you to download all of your upvoted or saved links from reddit.
Supported websites:
- imgur
- reddit-hosted images
- direct tumblr links
- Everything supported by youtube-dl (see youtube-dl for more)
- reddit self-posts
PRAW (6.0.0) | Python Reddit Api Wrapper |
youtube-dl (2018.08.04) | YouTube (and so much more) video downloader |
imgurpython (1.1.7) | Python client for the imgur API |
GTK Installer (3.24.13) | Rendering tools for weasyprint |
WeasyPrint (v51) | Webpage PDF capture tool |
Only a few steps are needed to get up and running. First open UserInfo.py
for editing. You can modify the following settings:
ignoreImgurAlbums | Should UpvoteDownloader skip imgur albums? |
|
mypath | Specify the download location |
|
whatToDownload | Should UpvoteDownloader download upvoted posts, saved posts, or both? |
|
ignoreHidden | Should UpvoteDownloader skip upvoted links that are also hidden? |
|
In order to get your reddit client ID and secret,
- Go to https://www.reddit.com/prefs/apps
- Scroll down and select "are you a developer? create an app..."
- Enter any name you want
- Select "script"
- Set "redirect uri" to something like "http://localhost:8080". Doesn't really matter what you choose as long as it's valid
- Click "create app"
- The code under "personal use script" is your client ID and the secret is your client secret. Enter it into UserInfo.py
In order to get your imgur client ID and secret (necessary to download albums, but not single images),
- Create an imgur account if you don't already have one
- Go to https://api.imgur.com/oauth2/addclient
- Enter any name you want
- Select "Anonymous usage without user authorization"
- Set "Authorization callback URL" to something like "http://localhost:8080". Doesn't really matter what you choose as long as it's valid
- Enter a valid email
- Your client ID and secret will be emailed to you. Enter it into UserInfo.py
In order to download text posts as .PDFs, we need to install GTK and WeasyPrint. Further installation info can be found here.
After UserInfo.py
is set, make sure you have a stable internet connection and a reasonable amount of storage space (requirement will vary widely by user). Run UpvoteDownloader.py
and your files should download. As long as you do not rename anything, UpvoteDownloader will not overwrite already downloaded files, saving bandwidth and time. Links that are unreachable, or unable to be downloaded will be written to UndownloadableLinks.txt
in the same directory as UpvoteDownloader.py
.
youtube-dl does most of the heavy lifting in this script, and supports a lot more than what's currently in the ytdlsupport.txt
file. In the interest of removing clutter, I limited the file to only include websites that I personally tested and found to work well. A full list of the sites youtube-dl should support can be found here. You can added the domains to ytdlsupport.txt
to include them in your downloads. Remember to escape the periods (\.) and backslashes (\/) in longer urls.
- Figure out how to download images from tumblr that don't end in an image file extension
- Change UserInfo.py to a cfg or text file
- Install youtube-dl and imgurpython for the user instead of them having to do it manully