[Pywikipedia-l] SVN: [5428] trunk/pywikipedia/wikipedia.py
filnik at svn.wikimedia.org
filnik at svn.wikimedia.org
Thu May 22 18:55:08 UTC 2008
Revision: 5428
Author: filnik
Date: 2008-05-22 18:55:08 +0000 (Thu, 22 May 2008)
Log Message:
-----------
I've put the same function twice
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2008-05-22 18:44:32 UTC (rev 5427)
+++ trunk/pywikipedia/wikipedia.py 2008-05-22 18:55:08 UTC (rev 5428)
@@ -807,6 +807,7 @@
self._getexception
except AttributeError:
raise SectionError # Page has no section by this name
+ # TODO: Docu and rewrite also this as above.
x = text[i1:i2]
x = unescape(x)
while x and x[-1] in '\n ':
@@ -2618,22 +2619,6 @@
except IndexError:
raise NoPage(u'API Error, nothing found in the APIs')
- def getLatestUploader(self):
- """ Function that uses the APIs to detect the latest uploader of the image """
- params = {
- 'action' :'query',
- 'prop' :'imageinfo',
- 'titles' :self.title(),
- }
- 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
- pageid = data['query']['pages'].keys()[0]
- nick = data['query']['pages'][pageid][u'imageinfo'][0]['user']
- return nick
- except IndexError:
- raise NoPage(u'API Error, nothing found in the APIs')
-
def getFileVersionHistoryTable(self):
"""Return the version history in the form of a wiki table."""
lines = []
More information about the Pywikipedia-l
mailing list