Revision: 5829 Author: jitseniesen Date: 2008-08-21 16:06:39 +0000 (Thu, 21 Aug 2008)
Log Message: ----------- Site.allpages() bug fix
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-08-21 15:37:26 UTC (rev 5828) +++ trunk/pywikipedia/wikipedia.py 2008-08-21 16:06:39 UTC (rev 5829) @@ -5150,9 +5150,8 @@ for page in self._allpagesOld(start, namespace, includeredirects, throttle): yield page
- rEntry = re.compile('<p pageid="\d+" ns="\d+" title="(?P<title>.*?)" />') - while True: + api_url = self.api_address() startEncoded = urllib.quote(start.encode(self.encoding())) api_url += 'action=query&format=xml&list=allpages&apfrom=%s&aplimit=%i&apnamespace=%i' % (startEncoded, config.special_page_limit, namespace) # TODO: support includeredirects="only" like in the old method