Created
January 21, 2013 04:06
-
-
Save jmgrosen/4583519 to your computer and use it in GitHub Desktop.
ShockedRarity bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import time | |
manspike = '(/manspike)' | |
rarishock = '[](/rarishock)' | |
reddit = praw.Reddit('Responds to (/manspike) on /r/mylittlepony with (/rarishock) ' | |
'by /u/jmgrosen/') | |
reddit.login('ShockedRarity', '********') | |
already_done = [] | |
while True: | |
rmlp = reddit.get_subreddit('mylittlepony') | |
for comment in rmlp.get_comments(): | |
if comment.id not in already_done and manspike in comment.body: | |
print comment.id, comment.body | |
comment.reply(' '.join([rarishock for _ in range(comment.body.count(manspike))])) | |
already_done.append(comment.id) | |
time.sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment