[Pywikipedia-l] [ pywikipediabot-Bugs-1969083 ] getFileVersionHistory is broken

SourceForge.net noreply at sourceforge.net
Thu May 22 14:45:16 UTC 2008


Bugs item #1969083, was opened at 2008-05-21 19:58
Message generated for change (Comment added) made by filnik
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1969083&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Multichill (multichill)
Assigned to: Nobody/Anonymous (nobody)
Summary: getFileVersionHistory is broken

Initial Comment:
getFileVersionHistory (in wikipedia.py) only returns an empty list.

When i look at a random image (for example http://en.wikipedia.org/wiki/Image:20070420-Korinthos-9106.JPG) i noticed the bold date/time

I looked at the regular expression at line 2586:
http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/wikipedia.py?annotate=5416

lineR = re.compile(r'<tr>(?:<td>.*?</td>){1,2}<td><a href=".+?">(?P<datetime>.+?)</a></td><td><a href=".+?"(?: class="new"|) title=".+?">(?P<username>.+?)</a>.*?</td><td>(?P<resolution>.*?)</td><td class=".+?">(?P<filesize>.+?)</td><td>(?P<comment>.*?)</td></tr>')

But the source is

<tr><td>current</td><td class='filehistory-selected' style='white-space: nowrap;'><a href="http://upload.wikimedia.org/wikipedia/en/6/6a/20070420-Korinthos-9106.JPG">21:39, 21 May 2008</a></td><td>2,048×1,536 <span style='white-space: nowrap;'>(1.03 MB)</span></td><td><a href="/wiki/User:Sv1xv" title="User:Sv1xv">Sv1xv</a> <span style='white-space: nowrap;'> (<a href="/wiki/User_talk:Sv1xv" title="User talk:Sv1xv">Talk</a> | <a href="/wiki/Special:Contributions/Sv1xv" title="Special:Contributions/Sv1xv">contribs</a>)</span></td><td> <span class="comment">({{Information |Description=ALCo DL537 metric line locomotive of Hellenic State Railways at Corinth Old Railway Station. |Source=self-made |Date=2007-04-20 |Author=Konstantinos Krallis |other_versions= | Permission={{GFDL-self-no-disclaimers}} }}  [[Catego)</span></td></tr>

I dont think this will match.

----------------------------------------------------------------------

>Comment By: Filnik (filnik)
Date: 2008-05-22 14:45

Message:
Logged In: YES 
user_id=1834469
Originator: NO

Added getLatestUploader() that does all what we need, if you want to
delete the other function or someone wants to update it, just do it. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1969083&group_id=93107



More information about the Pywikipedia-l mailing list