Skip to content

anonymous /picsbot secret

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This bot searches for Post on /r/pics with the words "dead", "cancer", "died", "hero", "fight" in the title and sends their link to another user
#This bot searches for Post on /r/pics with the words "dead", "cancer", "died", "hero", "fight" in the title and sends their link to another user
import time
import praw
r = praw.Reddit("testbot by /u/IWannaFuckLarryPage")
r.login("insert bot name here","password")
already_done = []
wortliste = ["dead", "cancer", "died", "hero", "fight"]
while True:
subreddit = r.get_subreddit('pics')
for submission in subreddit.get_hot(limit=100):
title = submission.title.lower()
enthaeltwort = any(string in title for string in wortliste)
if submission.id not in already_done and enthaeltwort:
msg = "Shitty pathetic post:" + str(submission.short_link)
r.user.send_message("account that shall receive the message", msg)
already_done.append(submission.id)
time.sleep(1800)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.