Page MenuHomePhabricator

RandomPageGenerator returns max 10 pages
Closed, ResolvedPublic

Description

import pywikibot
from pywikibot import pagegenerators

s = pywikibot.getSite('no', 'wiktionary')
gen = pagegenerators.RandomPageGenerator(number=100, site=s)
for p in gen:
    print p

If number > 10, max 10 pages are returned.

"query-continue" is not supported by random query, as assumed by QueryGenerator.iter() [see https://www.mediawiki.org/wiki/API:Random]


Version: core-(2.0)
Severity: normal

Details

Reference
bz56347

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:20 AM
bzimport set Reference to bz56347.

Change 93167 had a related patch set uploaded by Xqt:
(Bug 56347) Enable RandomPageGenerator() and site.randompages returning more than 10 pages

https://gerrit.wikimedia.org/r/93167

Change 93167 merged by jenkins-bot:
(Bug 56347) Enable RandomPageGenerator() and site.randompages returning more than 10 pages

https://gerrit.wikimedia.org/r/93167

jayvdb set Security to None.