Advertisement
Deathpacito2

Comment Nuker

Feb 8th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.42 KB | None | 0 0
  1. import praw
  2. import lorem
  3.  
  4. reddit = praw.Reddit(client_id='',
  5.              client_secret='',
  6.              password='',
  7.              user_agent='Reddit Nuker by Anon based on comment deleter by /u/camaronmars',
  8.              username='')
  9.  
  10. def arecomments():
  11.     comments = list(reddit.user.me().comments.new())
  12.     if len(comments) == 0:
  13.         comments = list(reddit.user.me().comments.hot())
  14.     if len(comments) == 0:
  15.         comments = list(reddit.user.me().comments.top())
  16.     if len(comments) == 0:
  17.         comments = list(reddit.user.me().comments.controversial())
  18.     return len(comments)
  19.  
  20. def wiper(xn):
  21.     if len(list(reddit.user.me().comments.new())) > 0:
  22.         comments = reddit.user.me().comments.new()
  23.     elif len(list(reddit.user.me().comments.hot())) > 0:
  24.         comments = reddit.user.me().comments.hot()
  25.     elif len(list(reddit.user.me().comments.top())) > 0:
  26.         comments = reddit.user.me().comments.top()
  27.     elif len(list(reddit.user.me().comments.controversial())) > 0:
  28.         comments = reddit.user.me().comments.controversial()
  29.        
  30.     for comment in comments:
  31.         edited_body = lorem.paragraph()
  32.         print (edited_body)
  33.         comment.edit(edited_body)
  34.         comment.delete()
  35.         xn = xn + 1
  36.         print (xn)
  37.     return xn
  38. KC = 0
  39. cont = arecomments()
  40. while cont != 0:
  41.     KC = wiper(KC)
  42.     cont = arecomments()
  43.  
  44. print ("Completed, wiped",KC,"comments")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement