https://bugzilla.wikimedia.org/show_bug.cgi?id=64997
Bug ID: 64997 Summary: Site.preloadpages yields only one item per data request Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: info@gno.de Web browser: --- Mobile Platform: ---
(Maybe a new with mw 1.24) Site,preloadpageds only yields 1 item. Sample as follows:
import pwb import pywikibot as py s = py.Site('bar') pagenames =['Haiku', 'Homer', 'Ilias', 'Watzmo', 'Wean'] pagelist = [py.Page(s, name) for name in pagenames] gen = s.preloadpages(pagelist) for p in gen:
print p.title() Retrieving 5 pages from wikipedia:bar. Haiku
the request was /w/api.php?maxlag=5&format=json&rvprop=ids|flags|timestamp|user|comment|content&prop=revisions|info|categoryinfo&titles=Homer|Ilias|Watzmo|Wean|Haiku&meta=userinfo&indexpageids=&action=query&uiprop=blockinfo|hasmsg
inserting direct request call into preloadpages with
data = rvgen.request.submit() print '#### ####', len(data)
gives me
#### #### 1