http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11367
Revision: 11367 Author: legoktm Date: 2013-04-11 21:04:35 +0000 (Thu, 11 Apr 2013) Log Message: ----------- Fix watchlist.py, patch by Betacommand
Modified Paths: -------------- trunk/pywikipedia/watchlist.py
Modified: trunk/pywikipedia/watchlist.py =================================================================== --- trunk/pywikipedia/watchlist.py 2013-04-08 21:38:06 UTC (rev 11366) +++ trunk/pywikipedia/watchlist.py 2013-04-11 21:04:35 UTC (rev 11367) @@ -72,9 +72,8 @@
params = { 'action': 'query', - 'list': 'watchlist', - 'wllimit': pywikibot.config.special_page_limit, - 'wlprop': 'title', + 'list': 'watchlistraw', + 'wrlimit': pywikibot.config.special_page_limit, }
pywikibot.output(u'Retrieving watchlist for %s via API.' % repr(site)) @@ -84,10 +83,10 @@ data = pywikibot.query.GetData(params, site, sysop=sysop) if 'error' in data: raise RuntimeError('ERROR: %s' % data) - watchlist.extend([w['title'] for w in data['query']['watchlist']]) + watchlist.extend([w['title'] for w in data['watchlistraw']])
if 'query-continue' in data: - params.update(data['query-continue']['watchlist']) + params.update(data['query-continue']['watchlistraw']) else: break
pywikipedia-svn@lists.wikimedia.org