Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_forum_topics gets at maximum 101 forum topics #114

Open
3 tasks done
Urkov opened this issue Feb 5, 2025 · 3 comments
Open
3 tasks done

get_forum_topics gets at maximum 101 forum topics #114

Urkov opened this issue Feb 5, 2025 · 3 comments

Comments

@Urkov
Copy link

Urkov commented Feb 5, 2025

Checklist

  • I am sure the error is coming from Pyrofork's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U git+https://github.com/Mayuri-Chan/pyrofork and reproduced the issue using the latest development version

Description

When I use get_forum_topics(ID_GROUP) only get 21 forum topics but there are a lot more.

Steps to reproduce

  1. get the ID of the group
  2. print info of the all forum topics:
    for topic in app.get_forum_topics(group):
        print(f"{topic.id}, {topic.title}")
  1. Realize only print 21 forum topics

Code example

for topic in app.get_forum_topics(group):
    print(f"{topic.id}, {topic.title}")

Logs

@Urkov Urkov changed the title get_forum_topics only get few forum topics get_forum_topics only get 21 forum topics Feb 5, 2025
@wulan17
Copy link
Member

wulan17 commented Feb 5, 2025

set the limit parameter to bigger number than the topics count
for example:

for topic in app.get_forum_topics(group, limit=99):
    print(f"{topic.id}, {topic.title}")

@Urkov
Copy link
Author

Urkov commented Feb 5, 2025

set the limit parameter to bigger number than the topics count for example:

for topic in app.get_forum_topics(group, limit=99):
print(f"{topic.id}, {topic.title}")

Documentation does not says that.
Your solution is ok, but what happens when you don't know exactly the number of forum topics? I have a group with nearly 1000 forum topics or more but I don't know exactly the number.
It has not a propper pagination I suppose, right?

Edit:
I try with limit more than 101 and the result is always 101 forum topics. Any limitation in limit parameter?

@Urkov Urkov changed the title get_forum_topics only get 21 forum topics get_forum_topics gets at maximum 101 forum topics Feb 5, 2025
@Urkov
Copy link
Author

Urkov commented Feb 5, 2025

set the limit parameter to bigger number than the topics count for example:

for topic in app.get_forum_topics(group, limit=99):
print(f"{topic.id}, {topic.title}")

After few hours trying with different approaches, I can not get more than 101 flrum topics 😣

wulan17 added a commit that referenced this issue Feb 13, 2025
wulan17 added a commit that referenced this issue Feb 22, 2025
wulan17 added a commit that referenced this issue Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants