Skip to content

Python bot to search a subreddit and message you when it gets results.

License

Notifications You must be signed in to change notification settings

Goff-Davis/Watchr_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Watchr_Bot

License

A reddit search bot I created that searches a specific subreddit for keywords. It will message an account with a listing of what has been found. This can be useful for watching for posts. Personally I am using it to check r/watchexchange for watches that I want and notify me when they are listed.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See usage/deployment for notes on how to deploy the project on a live system.

Prerequisites

Software

pip install praw

Depending on your system you may need to do

pip3 install praw

Configuration

You will need a praw.ini file with the following information:

[watcher]
client_id=<Your reddit client id>
client_secret=<Your reddit secret>
username=<Yours or your bot's reddit username>
password=<Yours or your bot's reddit password>

To obtain a client id and secret you will need to register your app with reddit. Notify them here.

You will also need a config.json file with the following structure:

{
	"search_strings": ["<array of strings you want to search for>"],
	"search_category": "<Name of what you are searching for (for message formatting)>"
	"user": "<the username of the person you want to message>",
	"subreddit": "<the subreddit you want to search>",
	"time_filter": "<what time frame you want to search for>"
}

Usage/Deployment

This script can be run manually. Alternatively you can execute it programmatically, for example as a cronjob. I personally am running it on a Digital Ocean droplet as a cronjob once per hour.

Example of found results message

# New Listings Found

Watches in the categories: **parts**, **repair**, **for repair** have been found.

Links to the postings:

## parts
- [[WTS] Orient Ray Gen 1, Timex E-Compass (T49531), Seiko Compatible Modded Bezel Part](/r/Watchexchange/comments/gch45v/wts_orient_ray_gen_1_timex_ecompass_t49531_seiko/) (05-02-2020 20:24)


## repair
- [[WTS] Vostok, Dumai and Gameboy Watch + Clocks for Repair](/r/Watchexchange/comments/gcr69z/wts_vostok_dumai_and_gameboy_watch_clocks_for/) (05-03-2020 10:07)


## for repair
- [[WTS] Vostok, Dumai and Gameboy Watch + Clocks for Repair](/r/Watchexchange/comments/gcr69z/wts_vostok_dumai_and_gameboy_watch_clocks_for/) (05-03-2020 10:07)

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Python bot to search a subreddit and message you when it gets results.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages