Add pagination to category search for large categories
Large categories like "Living people" (900k+ articles) were impractical because the code tried to download all members before displaying results. Now stops after collecting ~200 articles and provides a "Next page" link. Also fixes the MediaWiki API continuation protocol: passes the full continue dict (not just gcmcontinue) so imcontinue responses are handled properly, and reduces gcmlimit from "max" to 50 so each batch's images fit in one API response. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ab012f9cf3
commit
57b2e474df
2 changed files with 54 additions and 15 deletions
|
|
@ -44,6 +44,12 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if gcmcontinue %}
|
||||
<div class="mt-3">
|
||||
<a href="{{ url_for('category_search', cat=cat, gcmcontinue=gcmcontinue) }}" class="btn btn-outline-primary">Next page »</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<div class="alert alert-success mt-3">
|
||||
All articles in this category have images!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue