Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- def is_bot(u):
- co = 0
- t = 0
- user = reddit.redditor(u)
- for c in user.comments.new(limit=None):
- if 'monero' in c.body.lower() or 'xmr' in c.body.lower():
- co = co +1
- t = t + 1
- if (co/t)*100 > 40:
- return True
- return False
- #print('%s/%s' % (str(co), str(t)) )
- users = [
- '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']
- id = ''
- secret = ''
- reddit = praw.Reddit(
- client_id=id,
- client_secret=secret,
- user_agent="bot:by u/earthonion",
- password = '',
- username = ''
- )
- print('Logged in as: %s' % reddit.user.me())
- xmr_c = []
- 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']
- try:
- f = open('bots.txt', 'a')
- for comment in reddit.subreddit('+'.join(sr)).comments(limit=None):
- if 'monero' in comment.body.lower() or 'xmr' in comment.body.lower():
- if not comment.author.name in xmr_c:
- try:
- if is_bot(comment.author.name):
- xmr_c.append(comment.author.name)
- print(comment.author.name)
- f.write('/u/'+comment.author.name + '\n')
- except:
- pass
- except Exception as e:
- print(e)
- #print(comment.body)
- if __name__ == '__main__':
- pass
- #app.run(debug=True)
Add Comment
Please, Sign In to add comment