https://bugzilla.wikimedia.org/show_bug.cgi?id=71538

            Bug ID: 71538
           Summary: Pages might not be returned in data at first
                    req.submit() in Query.Generators
           Product: Pywikibot
           Version: core (2.0)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
       Web browser: ---
   Mobile Platform: ---

import pywikibot
site = pywikibot.getSite()
cat = pywikibot.Category(site, 'Speeches')
for i in cat.subcategories(total=5):
    print i

returns empty list even if subcats are present.

api,py gives up at first try if this fails:
    if self.resultkey in self.data["query"]:

it should try again a query has still data to provide:

{u'query-continue': {u'categorymembers': {u'gcmcontinue':
u'page|414444524553532044454c49564552454420415420544845204d41534f4e20434f4c4c4547452c20414e0a45535341595320414e44204144445245535345532f414e20414444524553532044454c49564552454420415420544845204d41534f4e20434f4c4c454745|411259'}},
u'query': {u'userinfo': {u'id': 257091, u'name': u'Mpaa'}}}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to