Advertisement
Guest User

Untitled

a guest
May 1st, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. import praw
  4.  
  5. r = praw.Reddit('Unban by /u/RossTheColonel')
  6. subreddit = r.get_subreddit('the_donald')
  7. unbanstring = 'I disavow'
  8. r.login('RossTheColonel', '___',disable_warning=True)
  9. while True:
  10. for comment in praw.helpers.comment_stream(r, 'DisavowBernie'):
  11. try:
  12. cbody = comment.body
  13. cauthor = comment.author
  14. if cbody.lower() == unbanstring.lower():
  15. subreddit.remove_ban(cauthor)
  16. print("Done")
  17. except:
  18. print("Fail")
  19. continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement