Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- r = praw.Reddit("Warlizard karma counter v0.1")
- warlizard = r.get_redditor("warlizard")
- scores = []
- amount_no_face_in = 0
- for comment in warlizard.get_comments(limit = 1000):
- if "ಠ_ಠ" in comment.body or "ಠ_ಠ" in comment.body: # ಠ_ಠ = lizard face in HTML entities
- scores.append(comment.score)
- else:
- amount_no_face_in += 1
- print("Found {} comments with ಠ_ಠ in it".format(len(scores)))
- print("Found {} without".format(amount_no_face_in))
- print("Total amount of upvotes gained: " + str(sum(scores)))
- print("Mean of upvotes: " + str(sum(scores) / len(scores)))
- print("Most upvotes: " + str(max(scores)))
- print("Minimum upvotes: " + str(min(scores)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement