Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- u = ''
- p = ''
- c_id = ''
- c_secret = ''
- reddit = praw.Reddit(username = u, password = p, client_id = c_id, cient_secret = c_secret)
- def main():
- try:
- for item in reddit.inbox.stream():
- try:
- if 'delete' in item.body.lower():
- item.parent().delete()
- except:
- except(KeyboardInterrupt):
- raise KeyboardInterrupt
- except:
- main()
- while True:
- try:
- main()
- except(KeyboardInterrupt):
- raise KeyboardInterrupt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement