https://bugzilla.wikimedia.org/show_bug.cgi?id=60206
Web browser: --- Bug ID: 60206 Summary: site.preloadpages does not preload all links and templates 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: mpaa.wiki@gmail.com Classification: Unclassified Mobile Platform: ---
When in def preloadpages(self, pagelist, groupsize=50, templates=False, langlinks=False) templates=True and langlinks=True, not all lnks/templates are returned.
import pywikibot
site = pywikibot.Site('en', 'wikipedia') page = pywikibot.Page(site, 'Main Page')
for p in site.preloadpages([page], templates=True, langlinks=True): pass print 'p._templates', len(page._templates) print 'p._langlinks', len(page._langlinks)
They are actually more, see https://en.wikipedia.org/w/api.php?maxlag=5&format=jsonfm&rvprop=ids...