Last active
August 29, 2015 14:05
-
-
Save xzenf/d0693a61e734b09a6cb4 to your computer and use it in GitHub Desktop.
Revisions
-
Alex revised this gist
Aug 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,4 @@ count = 0 for comment in sub: count += comment.gilded print("Total gold is: {}".format(count)) -
Alex created this gist
Aug 17, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ import praw r = praw.Reddit('Counting gilded/1.0') sub = r.get_submission(submission_id='28j8cz') sub.replace_more_comments(limit=None, threshold=0) sub = praw.helpers.flatten_tree(sub.comments) count = 0 for comment in sub: count += comment.gilded print("Total gold is: {}".format(count))