[Pywikipedia-l] SVN: [5408] trunk/pywikipedia/checkimages.py
filnik at svn.wikimedia.org
filnik at svn.wikimedia.org
Mon May 19 14:18:00 UTC 2008
Revision: 5408
Author: filnik
Date: 2008-05-19 14:17:59 +0000 (Mon, 19 May 2008)
Log Message:
-----------
Found a better way, replacing it with the new one
Modified Paths:
--------------
trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2008-05-19 14:04:28 UTC (rev 5407)
+++ trunk/pywikipedia/checkimages.py 2008-05-19 14:17:59 UTC (rev 5408)
@@ -593,8 +593,8 @@
data = query.GetData(params, useAPI = True, encodeTitle = False)
try:
# We don't know the page's id, if any other better idea please change it
- for x in data['query']['pages']:
- nick = data['query']['pages'][x][u'imageinfo'][0]['user']
+ pageid = data['query']['pages'].keys()[0]
+ nick = data['query']['pages'][pageid][u'imageinfo'][0]['user']
except IndexError:
wikipedia.output(u"Seems that %s hasn't the image at all, but there is something in the description..." % self.image)
repme = "\n*[[:Image:%s]] problems '''with the APIs'''"
More information about the Pywikipedia-l
mailing list