Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #!/usr/bin/python
  2. #coding=utf-8
  3.  
  4. #imports
  5. import praw, sys
  6.  
  7. username = 'YOUR USERNAME'
  8. password = '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. str(sys.argv[1])
  16.  
  17. for comment in comments:
  18. try:
  19. comment_flair = comment.author_flair_text
  20. if ("Clemson Tigers" in comment_flair and str(sys.argv[1]) in comment.body.lower()): print("Clemson: " + comment.body)
  21. if ("Alabama Crimson Tide" in comment_flair and str(sys.argv[1]) in comment.body.lower()): print("Alabama: " + comment.body)
  22. except: pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement