Skip to content

Instantly share code, notes, and snippets.

@dylan-lawrence
Created October 15, 2015 16:24
Show Gist options
  • Save dylan-lawrence/4e3dd5739d897bd7daa3 to your computer and use it in GitHub Desktop.
Save dylan-lawrence/4e3dd5739d897bd7daa3 to your computer and use it in GitHub Desktop.
A quick comment shredder for reddit.
import praw
r = praw.Reddit(user_agent='comment_editor')
r.login('<username>', '<password>')
user = r.get_redditor('<username>')
comments = user.get_comments(limit = None)
i = 1
for comment in comments:
print ('iterations: ' + str(i))
if comment.body != '<replacement message>':
#print ('editing comment ' + str(comment))
comment.edit('<replacement message>')
i+=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment