[email protected] ha scritto: > Revision: 6674 > Author: shizhao > Date: 2009-04-22 18:31:25 +0000 (Wed, 22 Apr 2009) > > Log Message: > ----------- > add new parameter: "-gorandom". > Specifies that the robot should starting at the random pages returned by > [[Special:Random]]. > [...] > + > +-gorandom Specifies that the robot should starting at the random > pages > + returned by [[Special:Random]]. > """ > > > @@ -1009,6 +1012,14 @@ > transclusionPageTitle)) > gen = ReferringPageGenerator(transclusionPage, > onlyTemplateInclusion=True) > + elif arg.startswith('-gorandom'): > + for firstPage in RandomPageGenerator(number = 1): > + firstPageTitle = firstPage.title() > + namespace = wikipedia.Page(site, firstPageTitle).namespace() > + firstPageTitle = wikipedia.Page(site, > + firstPageTitle).titleWithoutNamespace() > + gen = AllpagesPageGenerator(firstPageTitle, namespace, > + includeredirects=False) > elif arg.startswith('-start'): > if arg.startswith('-startxml'): > wikipedia.output(u'-startxml : wrong parameter') >
I don't agree to implement this option. It isn't necessary request a page to [[Special:Random]] to get a hint about what download with [[Special:Allpages]]. And doesn't look for me useful an user option to do that or similar thing. -- Francesco Cosoleto "L'ho incontrato una volta sola. Fini non รจ una persona che si possa giudicare avendolo visto una volta sola. E io non ho intenzione di rivederlo." (Roberto Benigni) _______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
