Skip to content

Download images from a user-given subreddit, filter duplicates that were already downloaded and scrape and store metadata inside the image files' EXIF information

License

Notifications You must be signed in to change notification settings

lukas-kirschner/RedditImageScraper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Image Downloader

A Reddit application that downloads pictures from a given subreddit, scraping and storing all metadata.

Setup

  1. Create a reddit personal use script application.

  2. Add a credentials.json file to the project root directory and add your application's credentials.

    {
      "client_id": "ID",
      "client_secret": "SECRET",
      "user_agent": "AGENT",
      "imgur_client_id": "ID"
    }
  3. Run pip install -r requirements.txt

Usage

Run the script by typing python3 download_images.py <args>.

usage: Reddit Image Scraper [-h] -s SUBREDDIT [-l LIMIT] [-o DEST_DIR] [-c CONFIG_FILE]

A Reddit Image Downloader that supports metadata scraping.

options:
  -h, --help            show this help message and exit
  -s SUBREDDIT, --subreddit SUBREDDIT
                        Specify the subreddit or user account to scrape. Valid formats include "https://www.reddit.com/r/wallpapers/", "wallpapers", "r/wallpapers", "u/exampleuser", "reddit.com/user/exampleuser/submitted/?sort=top&t=day"
  -l LIMIT, --limit LIMIT
                        Specify the maximum number of new images to download
  -o DEST_DIR, --out-dir DEST_DIR
                        Specify the destination directory to download scraped files into. Default is "out/"
  -c CONFIG_FILE, --config CONFIG_FILE
                        Specifies the config file to read the configuration from. Defaults to a global config file in the user's configuration directory.

Your images will appear in the "out" folder created by the application. If the given config file does not exist, a default config file will be created.

About

Download images from a user-given subreddit, filter duplicates that were already downloaded and scrape and store metadata inside the image files' EXIF information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%