Revision: 6779 Author: cosoleto Date: 2009-04-30 15:27:26 +0000 (Thu, 30 Apr 2009)
Log Message: ----------- Changed default number of pages returned from RandomPageGenerator and RandomRedirectPageGenerator. 10 pages looks more fair for me, instead of 100, as here isn't used Special:Export or API to get data.
Modified Paths: -------------- trunk/pywikipedia/pagegenerators.py
Modified: trunk/pywikipedia/pagegenerators.py =================================================================== --- trunk/pywikipedia/pagegenerators.py 2009-04-30 14:55:19 UTC (rev 6778) +++ trunk/pywikipedia/pagegenerators.py 2009-04-30 15:27:26 UTC (rev 6779) @@ -125,12 +125,12 @@
-random Work on random pages returned by [[Special:Random]]. Can also be given as "-random:n" where n is the number - of pages to be returned, else 100 pages are returned. + of pages to be returned, else 10 pages are returned.
-randomredirect Work on random redirect target pages returned by [[Special:Randomredirect]]. Can also be given as "-randomredirect:n" where n is the number of pages to be - returned, else 100 pages are returned. + returned, else 10 pages are returned.
-gorandom Specifies that the robot should starting at the random pages returned by [[Special:Random]]. @@ -393,13 +393,13 @@ for page in linkingPage.linkedPages(): yield page
-def RandomPageGenerator(number = 100, site = None): +def RandomPageGenerator(number = 10, site = None): if site is None: site = wikipedia.getSite() for i in range(number): yield site.randompage()
-def RandomRedirectPageGenerator(number = 100, site = None): +def RandomRedirectPageGenerator(number = 10, site = None): if site is None: site = wikipedia.getSite() for i in range(number):
pywikipedia-svn@lists.wikimedia.org