Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Created on Feb 9, 2017
- @author: Ryan Schubert
- '''
- import praw
- r = praw.Reddit(client_id='REDACTED',
- client_secret='REDACTED',
- password='REDACTED',
- user_agent='TP_Stats by /u/stirus',
- username='TP_Stats')
- submissions = r.subreddit('nltp').stream.submissions()
- uauth = {}
- uauth = set()
- fkey = {"sb-abo", "sb-tc", "sb-tan", "sb-icp", "sbb-abo", "sbb-tc", "sbb-cj", "sbb-acap", "sb-crc", "sb-cha"}
- flairs = []
- i = 0
- x = 1
- for submission in submissions:
- comments = submission.comments
- for comment in comments:
- author = comment.author
- if author not in uauth:
- uauth.add(author)
- flair = comment.author_flair_css_class
- if flair in fkey:
- flairs.insert(0,flair)
- print(author, flair)
- else:
- print("duplicate ", i)
- i = i + 1
- for f in fkey:
- print(f, flairs.count(f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement