Last modified: 2014-02-17 02:41:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57028, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55028 - adding 'bot' argument for NewpagesPageGenerator()
adding 'bot' argument for NewpagesPageGenerator()
Status: NEW
Product: Pywikibot
Classification: Unclassified
pagegenerators (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:06 UTC by Kunal Mehta (Legoktm)
Modified: 2014-02-17 02:41 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:06:32 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/316/
Reported by: reza1615
Created on: 2012-09-25 14:04:52
Subject: adding bot varable for NewpagesPageGenerator()
Original description:
I don't have developer acount
In pagegenerator.NewpagesPageGenerator\(\) llike wikipedia.newpages\(\) please add bot variable
In pagegenerator.py it need  replace line 562-571 with this code 


def NewpagesPageGenerator\(number=100, repeat=False, site=None, namespace=0,bot=True\):
"""
Iterate Page objects for all new titles in a single namespace.
"""
\# defaults to namespace 0 because that's how Special:Newpages defaults
if site is None:
site = pywikibot.getSite\(\)
if bot:
for item in site.newpages\(number=number, repeat=repeat, namespace=namespace,
rcshow=\['\!redirect'\]\):
yield item\[0\]
else:
for item in site.newpages\(number=number, repeat=repeat, namespace=namespace,
rcshow=\['\!bot','\!redirect'\]\):
yield item\[0\]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links