Advertisement
Guest User

Untitled

a guest
Apr 5th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. import praw
  2.  
  3. reddit=praw.Reddit(client_id='the random string under your bot name',
  4. client_secret='the secret key',
  5. username='your username',
  6. password='your password',
  7. user_agent='how you called the bot')
  8. subreddit=reddit.subreddit("circleoftrust")
  9.  
  10. rising=subreddit.rising(limit=2000)
  11. contacted=[]
  12. for submission in rising:
  13. number=submission.author_flair_text
  14. if number is not None:
  15. this=number.split(",")[1][1:-1]
  16. if this.isnumeric()==True:
  17. this=int(this)
  18. print(this)
  19. if this>1 and this<20:
  20. subject='key'
  21. message="can you pm me the key?"
  22. user=submission.author
  23. if user not in contacted:
  24. user.message(subject,message)
  25. contacted.append(user)
  26. print(user)
  27. elif this>20:
  28. subject='key'
  29. message="can you pm me the key?"
  30. user=submission.author
  31. if user not in contacted:
  32. user.message(subject,message)
  33. contacted.append(user)
  34. print(user)
  35. else:
  36. subject='key'
  37. message="can you pm me the key?"
  38. user=submission.author
  39. if user not in contacted:
  40. user.message(subject,message)
  41. contacted.append(user)
  42. print(user)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement