http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10916
Revision: 10916 Author: saper Date: 2013-01-14 10:17:17 +0000 (Mon, 14 Jan 2013) Log Message: ----------- Make it possible to [[Special:Export]] full history
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-01-14 10:03:33 UTC (rev 10915) +++ trunk/pywikipedia/wikipedia.py 2013-01-14 10:17:17 UTC (rev 10916) @@ -4915,7 +4915,7 @@ if self.site.family.isDefinedNSLanguage(id, lang) and id not in header.namespaces: output(u"WARNING: Family file %s includes namespace['%s'][%i], but it should be removed (namespace doesn't exist in the site)" % (self.site.family.name, lang, id))
- def getData(self): + def getData(self, curonly=True): address = self.site.export_address() pagenames = [page.sectionFreeTitle() for page in self.pages] # We need to use X convention for requested page titles. @@ -4930,8 +4930,9 @@ predata = { 'action': 'submit', 'pages': pagenames, - 'curonly': 'True', } + if curonly: + predata['curonly'] = 'True' # Slow ourselves down get_throttle(requestsize = len(self.pages)) # Now make the actual request to the server