Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import praw
  2.  
  3. u = ''
  4. p = ''
  5. c_id = ''
  6. c_secret = ''
  7.  
  8. reddit = praw.Reddit(username = u, password = p, client_id = c_id, cient_secret = c_secret)
  9.  
  10.  
  11. def main():
  12. try:
  13. for item in reddit.inbox.stream():
  14. try:
  15. if 'delete' in item.body.lower():
  16. item.parent().delete()
  17. except:
  18. except(KeyboardInterrupt):
  19. raise KeyboardInterrupt
  20. except:
  21. main()
  22.  
  23. while True:
  24. try:
  25. main()
  26. except(KeyboardInterrupt):
  27. raise KeyboardInterrupt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement