Guest User

Untitled

a guest
Jul 1st, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import praw
  2. from collections import Counter
  3. from pprint import pprint
  4.  
  5. reddit = praw.Reddit(username="", password="", client_id="", client_secret="", user_agent="")
  6.  
  7. flairs = list(reddit.subreddit("teenagers").flair(limit=None))
  8.  
  9. print("Total flaired users:", len(flairs))
  10.  
  11. pprint(Counter([_["flair_text"] for _ in flairs]))
  12.  
  13. # pprint(Counter([_["flair_css_class"] for _ in flairs])) # If you want to list by CSS class instead
Add Comment
Please, Sign In to add comment