Skip to content

A simple code that can be used to download images and gifs from Reddit submissions

Notifications You must be signed in to change notification settings

itsdicky/reddit-media-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reddit-media-downloader

A simple code that can be used to download images and gifs from Reddit submissions and store them in a specific directory. This code uses PRAW to get media URLs from Reddit.

Supported media extension: jpg, png, gif

Installation

Before run the script install this required package

pip install praw

Configuration

Before using this script, you should create a configuration file named config.ini inside the root directory, the content should be like this:

[REDDIT]
CLIENT_ID = <your client id>
CLIENT_SECRET = <your secret>
USER_AGENT = script:com.rmd.script:v1.0 (by u/satdic)
USERNAME = <your reddit username>
PASSWORD = <your reddit password>

[SETUP]
SAVE_DIRECTORY = <your save directory>

For CLIENT_ID and CLIENT_SECRET you can get them from Reddit or you can check OAuth2.

Usage

How to run this script

python main.py [download type]

While running the script, you will be shown several forms for additional information like submission limit, redditor username, subreddit name, and submission URL.

There is 4 download types:

  1. saved, will download media from your saved submission.
  2. subreddit, will download media from specific subreddit.
  3. redditor, will download media from specific redditor.
  4. submission, will download a single media from specific submission.

Example

python main.py saved

Then you will be shown like this

Enter submission limit:

Fill in the number of submissions you will download and it will try to download media from your saved submission with the specific limit you are given and then store them in a specific directory.

Note: It will download supported file extensions only, so the not supported ones will be skipped.

Contact

itsDicky - disatriage@gmail.com

Project Link: https://github.com/itsdicky/reddit-media-downloader

About

A simple code that can be used to download images and gifs from Reddit submissions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages