public
anonymous / comment_time.py
Created

Reddit post/comment time statistics

  • Download Gist
comment_time.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13
from ReddiWrap import ReddiWrap
reddit = ReddiWrap(user_agent='Comment time statistics collector')
 
posts = reddit.get('')
num_posts = len(posts)
while num_posts <= 100:
for p in posts:
if p.num_comments > 0:
reddit.fetch_comments(p, limit=1, sort='best')
c = p.comments[0]
print (c.created_utc - p.created_utc) / 60
reddit.get_next()
num_posts += len(posts)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.