Guest User

Untitled

a guest
Sep 2nd, 2021
46
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2. from datetime import datetime, timedelta
  3. import time
  4. import praw
  5.  
  6. for x in range(10):
  7. r = praw.Reddit(client_id='',
  8. client_secret='',
  9. user_agent='',
  10. username='',
  11. password='')
  12. user = r.redditor('')
  13.  
  14. counter = 0
  15.  
  16. #user.comments.replace_more(limit=0)
  17. for comment in user.comments.new(limit=1000):
  18. if comment.score < 100 \
  19. and datetime.fromtimestamp(comment.created_utc) <\
  20. (datetime.now() - timedelta(days=2)):
  21. comment.delete()
  22. counter = counter + 1
  23. #print(comment.body)
  24.  
  25. time.sleep(60 * random.randrange(11, 29))
  26.  
RAW Paste Data