Skip Navigation

Getting more than 50 posts - Pythorhead

Hello Lemmy!

I am messing with a bot, using the Pythorhead library.

When I try to get more than 50 posts from a community, I get the error:

couldnt_get_posts

Here is my example request:

lemmy.post.list(1234,None,51,None,None,SortType.New,None)

Is there a way to retrieve more than 50 posts from a community? I run my own tiny instance and I have rate limits set pretty high, but I don't see a way around this. Not sure if this is a setting in the library or if this is a configuration on the instance.

Any ideas?

2

You're viewing a single thread.

2 comments
  • You might need to get them in batches, i.e. use the page parameter to get multiples of 50.

    • Note that due to new posts appearing the results might overlap in content.