This is a script that accesses a subreddit and downloads media content based on keywords from the submission title.
These dependencies, if you don't have them, can be installed with pip.
- praw
- wget
- configparser
- Setup a praw.ini file with your reddit username, password, user_agent, client_id, and client_secret.
You can register the app with your account for authentication here: https://www.reddit.com/prefs/apps/
- Keep the praw.ini file in the same directory as the python script.
- Modify the config.ini file with your subreddit, search terms, optional parameters, etc...
Refer to the config.ini section of the ReadMe for additional information.
- Run the main.py script.
subreddit_name -> name of the subreddit you wish to scan
search_terms -> list of keywords seperated by commas
output_directory -> an output directory address for downloaded media
file_extensions -> the types of files to download
url_types -> whitelisted websites/links to download from
search_limit -> the scan search limit (default=1024)
allow_nsfw -> allow/disallow scanning of nsfw content (default=False)
allow_stream -> allow/disallow continuous subreddit scanning for new media (default=False)
split_folders -> split files in subfolders based on extension (default=True)
If you mess something up, you can copy/paste the contents of the example_config.ini file into the config.ini file to reset it.
You can use the template provided in this repository and fill in the required information as detailed in the usage section of the readme.
Use the github issue template provided in the repository.