Revision: 5615 Author: russblau Date: 2008-06-23 13:29:42 +0000 (Mon, 23 Jun 2008)
Log Message: ----------- Comment out undocumented throttle calls that appear to add delay for no reason
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-06-23 08:28:03 UTC (rev 5614) +++ trunk/pywikipedia/wikipedia.py 2008-06-23 13:29:42 UTC (rev 5615) @@ -2001,7 +2001,7 @@ else: response, data = self.site().postForm(address, predata) data = data.encode(self.site().encoding()) - get_throttle.setDelay(time.time() - now) +# get_throttle.setDelay(time.time() - now) output = [] # TODO: parse XML using an actual XML parser instead of regex! r = re.compile("<revision>.*?<id>(?P<id>.*?)</id>.*?<timestamp>(?P<timestamp>.*?)</timestamp>.*?<(?:ip|username)>(?P<user>.*?)</(?:ip|username)>.*?<text.*?>(?P<content>.*?)</text>",re.DOTALL) @@ -2837,7 +2837,7 @@ # The XML parser doesn't expect a Unicode string, but an encoded one, # so we'll encode it back. data = data.encode(self.site.encoding()) - get_throttle.setDelay(time.time() - now) +# get_throttle.setDelay(time.time() - now) return data
def getall(site, pages, throttle=True, force=False):