jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/432718 )
Change subject: [cleanup] Cleanup pagegenerators.NewpagesPageGenerator ......................................................................
[cleanup] Cleanup pagegenerators.NewpagesPageGenerator
use site.newpages() instead of site.recentchanges()
Change-Id: Id59dc85de601e946e530a94981a708a23c2a9b88 --- M pywikibot/pagegenerators.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: Zhuyifei1999: Looks good to me, but someone else must approve Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 8208fad..4998ba9 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -1232,9 +1232,9 @@ # defaults to namespace 0 because that's how Special:Newpages defaults if site is None: site = pywikibot.Site() - for item in site.recentchanges(changetype='new', namespaces=namespaces, - total=total): - yield pywikibot.Page(pywikibot.Link(item["title"], site)) + for page, item in site.newpages(namespaces=namespaces, total=total, + returndict=True): + yield page
@deprecated_args(nobots=None, step=None)
pywikibot-commits@lists.wikimedia.org