Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/python2.7
- import sys
- import praw
- # Quick and dirty. Run multi.
- client_id = ''
- client_secret = ''
- client_username = ''
- client_password = ''
- client_user_agent = 'Comment Prune'
- comment_threshold = 5
- reddit = praw.Reddit(client_id=client_id,
- client_secret=client_secret,
- password=client_password,
- user_agent=client_user_agent,
- username=client_username)
- user = reddit.redditor(client_username)
- delete_total = 0
- for comment in user.comments.new():
- if(comment.score < comment_threshold):
- comment.delete()
- delete_total += 1
- print('Deleted: ' + str(delete_total) + ' comments')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement