Revision: 7968 Author: xqt Date: 2010-02-26 17:57:24 +0000 (Fri, 26 Feb 2010)
Log Message: ----------- fix for query-continue
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-02-26 16:20:35 UTC (rev 7967) +++ trunk/pywikipedia/wikipedia.py 2010-02-26 17:57:24 UTC (rev 7968) @@ -5946,7 +5946,7 @@ 'letype' : mode, 'lelimit' : int(number), } - + if number > config.special_page_limit: params['lelimit'] = config.special_page_limit if number > 5000 and self.site().isAllowed('apihighlimits'): @@ -5971,16 +5971,17 @@ if nbresults >= number: break if 'query-continue' in result and nbresults < number: - params['ucstart'] = result['query-continue']['logevents']['ucstart'] + params['lestart'] = result['query-continue']['logevents']['lestart'] elif repeat: nbresults = 0 try: - params.pop('ucstart') + params.pop('lestart') except KeyError: pass else: break return + def newpages(self, number = 10, get_redirect = False, repeat = False, namespace = 0): """Yield new articles (as Page objects) from Special:Newpages.
pywikipedia-svn@lists.wikimedia.org