Guest User

xmr_safe0.0.1.py

a guest
Apr 1st, 2021
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.00 KB | None | 0 0
  1. import praw
  2.  
  3.  
  4. def is_bot(u):
  5.     co = 0
  6.     t = 0
  7.     user = reddit.redditor(u)
  8.     for c in user.comments.new(limit=None):
  9.         if 'monero' in c.body.lower() or 'xmr' in c.body.lower():
  10.             co = co +1
  11.            
  12.         t = t + 1
  13.     if (co/t)*100 > 40:
  14.         return True
  15.     return False
  16.     #print('%s/%s' % (str(co), str(t)) )
  17.  
  18. users = [
  19. 'planetalpotorous950', 'glovedGutter67', 'bereftschiller69', 'cloyingcourt', 'upstatecredit', 'clarionmassine122', 'dowdybobsled31', 'DilatoryThing', 'decadentcolumbia66', 'thicklydress968', 'besidessit426', 'aloofpurl185', 'octalSconce60', 'handilysamba285', 'daftlydull126', 'cyprinidmedium', 'focallyquarter', 'lemonyfennel971', 'dirtilyline', 'israelihackwork', 'honestlyscamp', 'episodiccowage', 'blindedarpent32', 'garishlyshunt73', 'slowlyLog', 'mediallymaster', 'wildsketch84', 'hostilethames249', 'aroundsharpen', 'clausalpolity', 'futilelydip99', 'rubbishygravure777', 'muchshoot71', 'backexcavate599', 'modernegoodenia430', 'manuallybate', 'divinelycommand263']
  20.  
  21.  
  22. id = ''
  23. secret = ''
  24.  
  25. reddit = praw.Reddit(
  26.     client_id=id,
  27.     client_secret=secret,
  28.     user_agent="bot:by u/earthonion",
  29.     password = '',
  30.     username = ''
  31. )
  32.  
  33. print('Logged in as: %s' % reddit.user.me())
  34.  
  35.  
  36. xmr_c = []
  37. sr = ['CryptoMarkets', 'CryptoCurrency', 'Bitcoin', 'SatoshiStreetBets', 'AltStreetBets', 'GME', 'BitcoinMarkets', 'darknet', 'onions', 'investing', 'privacy', 'bitcoin_ireland', 'Etizolam_Discussion', 'CoinPath', 'altcoin_news', 'MDMA', 'darknetmarket', 'psychadelics', 'CryptoCurrencies', 'OpiateChurch', 'deepweb']
  38.  
  39.  
  40. try:
  41.     f = open('bots.txt', 'a')
  42.  
  43.     for comment in reddit.subreddit('+'.join(sr)).comments(limit=None):
  44.    
  45.         if 'monero' in comment.body.lower() or 'xmr' in comment.body.lower():
  46.             if not comment.author.name in xmr_c:
  47.                 try:
  48.                     if is_bot(comment.author.name):
  49.                         xmr_c.append(comment.author.name)
  50.                         print(comment.author.name)
  51.                         f.write('/u/'+comment.author.name + '\n')
  52.                 except:
  53.                     pass
  54. except Exception as e:
  55.             print(e)
  56.             #print(comment.body)
  57.        
  58.  
  59.        
  60.        
  61. if __name__ == '__main__':
  62.         pass
  63.         #app.run(debug=True)
  64.        
Add Comment
Please, Sign In to add comment