Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #coding=utf-8
- #imports
- import praw
- username = 'INSERT YOUR USERNAME'
- password = 'INSERT YOUR PASSWORD'
- r = praw.Reddit('Game Thread Scraper')
- r.login(username,password)
- submission = r.get_submission(submission_id='5n37kq')
- submission.replace_more_comments(limit=1000, threshold=0)
- comments = praw.helpers.flatten_tree(submission.comments)
- for comment in comments:
- try:
- comment_flair = comment.author_flair_text
- if ("Clemson Tigers" in comment_flair and sys.argv[1] in comment.body.lower()): print("Clemson: " + comment.body)
- if ("Alabama Crimson Tide" in comment_flair and sys.argv[1] in comment.body.lower()): print("Alabama: " + comment.body)
- except: pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement