jenkins-bot has submitted this change and it was merged.
Change subject: apy.py: RandomPageGenerator always return 10 pages ......................................................................
apy.py: RandomPageGenerator always return 10 pages
In QueryGenerator loop, self.data needs to be deleted at each cycle to allow fresh data to be retrieved.
Bug: 72244 Change-Id: I78c32be606934f1abd51038e7150bd3a31b03462 --- M pywikibot/data/api.py 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 5357cc5..fff6959 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1094,6 +1094,7 @@ if self.module == "random" and self.limit: # "random" module does not return "query-continue" # now we loop for a new random query + del self.data # a new request is needed continue if "query-continue" not in self.data: return