http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9088
Revision: 9088 Author: jayvdb Date: 2011-03-18 05:56:27 +0000 (Fri, 18 Mar 2011) Log Message: ----------- Move rcshow to be a parameter for newpages (as it is in recentchanges)
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2011-03-18 05:42:45 UTC (rev 9087) +++ trunk/pywikipedia/wikipedia.py 2011-03-18 05:56:27 UTC (rev 9088) @@ -6081,7 +6081,7 @@ break return
- def newpages(self, number = 10, get_redirect = False, repeat = False, namespace = 0): + def newpages(self, number = 10, get_redirect = False, repeat = False, namespace = 0, rcshow = ['!bot','!redirect']): """Yield new articles (as Page objects) from Special:Newpages.
Starts with the newest article and fetches the number of articles @@ -6110,8 +6110,7 @@ 'rcnamespace': namespace, 'rclimit': int(number), 'rcprop': ['ids','title','timestamp','sizes','user','comment'], - 'rcshow': ['!bot','!redirect'], - #'': '', + 'rcshow': rcshow, } data = query.GetData(params, self)['query']['recentchanges']