/Pyris

A python application to pull Imgur images from the provided Reddit subreddits.

Primary LanguagePythonMIT LicenseMIT

PYRIS

PyRedditImgurScraping is a Python (3) tool to scrape Reddit subreddits. This tool enables you to pull Imgur images that are within the selected reddit subreddits and download them into your selected folder.

How to:

  1. Clone / Download the Github Repository.
  2. Extact the PyRedditImgurScraping into its own folder.
  3. Requires the installation of "feedparser" found here or "pip install feedparser".
  4. Adjust the "settings.ini" file to meet your requirements.
  5. Run the command "py index.py" from within the root folder.
  6. Profit.

Settings.ini

Settings

image_path: The direct path to the location you want to save your images.

image_limit: The max amount of images to download per subreddit (max 100, default: 50).

Options

build_core: If true, this will tell the tool to scrape the frontpage (reddit) for the current most active subreddits and then scrape all the Imgur links directly from them subreddits.

name_type: If changed to one of three options (random, standard, name), will affect the image name. (random: random number, standard: number counting system, name: the downloaded image name). name is the default in this tool

page_type: You can change this to adjust on what kind of images you get from Reddits filtering options (hot, new, rising, controversial, top), hot is the default by reddit while also the default in the tool.

Scraping_options

folder_names: This will be the folder name of which the images will be pulled into, you then will have to create a duplicate of that name below the folder_names. Giving that value all the subreddits you want to scrape. These values should be single space while separated by a single comma. Check the below example for a better understanding.

Example

[settings]
images_path = C:\Users\tehstun\Pictures
image_limit = 50

[options]
build_core = false
name_type = name
page_type = hot

[scraping_options]
folder_names = cute, awesomeSubReddits
cute = aww, animalssmiling, catpics, cats
awesomeSubReddits = AskReddit, MuseumOfReddit, AccidentalComedy