#316 adding bot varable for NewpagesPageGenerator()

open
nobody
featured (6)
5
2012-09-25
2012-09-25
reza
No

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]

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks