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: [email protected]
          Reporter: [email protected]
       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

-- 
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