Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #!/usr/bin/python
  2. #coding=utf-8
  3.  
  4. #imports
  5. import praw
  6.  
  7. username = 'INSERT YOUR USERNAME'
  8. password = 'INSERT YOUR PASSWORD'
  9. r = praw.Reddit('Game Thread Scraper')
  10. r.login(username,password)
  11.  
  12. submission = r.get_submission(submission_id='5n37kq')
  13. submission.replace_more_comments(limit=1000, threshold=0)
  14. comments = praw.helpers.flatten_tree(submission.comments)
  15.  
  16. for comment in comments:
  17. try:
  18. comment_flair = comment.author_flair_text
  19. if ("Clemson Tigers" in comment_flair and sys.argv[1] in comment.body.lower()): print("Clemson: " + comment.body)
  20. if ("Alabama Crimson Tide" in comment_flair and sys.argv[1] in comment.body.lower()): print("Alabama: " + comment.body)
  21. except: pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement