Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. import praw
  2. reddit = praw.Reddit('______')
  3. bot = praw.Reddit(client_id = '______', client_secret = '______', username = 'Bot', password = '______', user_agent = 'Bot 1.0') #id and secret were made with bot account
  4. subreddit = bot.subreddit('_______')
  5.  
  6. submission = reddit.submission(id='______')
  7. submission.comment_sort = 'new'
  8.  
  9. ### Enable one of the following two lines, comment out the other
  10. comments = subreddit.stream.comments() #if enabled, comments come through intended account (specially created bot account)
  11. comments = submission.comments.list() #if enabled, comments come through personal account
  12.  
  13. for comment in comments:
  14.     comment.reply("message")
  15.  
  16. print(reddit.user.me())
  17. # yields personal account, not bot account
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement