Advertisement
Guest User

Untitled

a guest
Aug 6th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #!/usr/local/bin/python2.7
  2. import sys
  3. import praw
  4.  
  5. # Quick and dirty. Run multi.
  6.  
  7. client_id = ''
  8. client_secret = ''
  9. client_username = ''
  10. client_password = ''
  11. client_user_agent = 'Comment Prune'
  12. comment_threshold = 5
  13.  
  14. reddit = praw.Reddit(client_id=client_id,
  15. client_secret=client_secret,
  16. password=client_password,
  17. user_agent=client_user_agent,
  18. username=client_username)
  19.  
  20. user = reddit.redditor(client_username)
  21. delete_total = 0
  22.  
  23. for comment in user.comments.new():
  24. if(comment.score < comment_threshold):
  25. comment.delete()
  26. delete_total += 1
  27.  
  28. print('Deleted: ' + str(delete_total) + ' comments')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement