secret
anonymous / picsbot
Created

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

  • Download Gist
picsbot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#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)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.