[Pywikipedia-l] a bug of wikipedia.Page.getVersionHistory().

mizusumashi mizusumashi at coda.ocn.ne.jp
Mon Feb 16 22:39:13 UTC 2009


I think that wikipedia.Page.getVersionHistory has a bug.
The function getVersionHistory return without edit summary at least in
Japanese Wikipedia.

The local variable editR is wrong.
The following version may work:
> editR = re.compile(r'<li>\([^\)]*\) \([^\)]*\) <[^>]*><[^>]*> <a href="[^\'"]*oldid=(\d*)"[^>]*>([^<]*)</a> <span class=[\'"]history-user[\'"]><a [^>]*>([^<]*)</a>(?:[^<]|<(?!span class="comment">)(?!/li>))*(?:<span class="comment">\((.*)\)</span>)?.*</li>', re.UNICODE)

I've tested this code rough.

Sorry for my poor English. Thank you.
----
  [[w:ja:user:mizusumashi]]





More information about the Pywikipedia-l mailing list