bolshevik
bolshevik

Reputation: 153

I'd like to get a list of the top posts of all time in a subreddit using praw

I can get the top posts for a certain day using the code below. Is there any way I can change this to the top posts of all time instead?

import praw

user_agent = "Comment Reader 1.0 by /u/crowbell"

r = praw.Reddit(user_agent=user_agent)

submissions = r.get_subreddit('askreddit').get_top(limit=5)
for x in submissions:
    print str(x)

Upvotes: 1

Views: 3736

Answers (1)

iCanHasFay
iCanHasFay

Reputation: 670

From the documentation, looks like get_top_from_all()

Upvotes: 6

Related Questions