http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10250
Revision: 10250 Author: xqt Date: 2012-05-24 14:59:29 +0000 (Thu, 24 May 2012) Log Message: ----------- Fix userpageR regex (pathc bug #3529250 submitted by weinstein). Thanks.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2012-05-24 14:51:46 UTC (rev 10249) +++ trunk/pywikipedia/wikipedia.py 2012-05-24 14:59:29 UTC (rev 10250) @@ -5773,7 +5773,7 @@ # Note that the link of anonymous users (which doesn't exist at all # in Wikimedia sites) has the ID pt-anonuserpage, and thus won't be # found here. - userpageR = re.compile('<li id="pt-userpage"><a href=".+?">(?P<username>.+?)</a></li>') + userpageR = re.compile('<li id="pt-userpage".*?><a href=".+?".*?>(?P<username>.+?)</a></li>') m = userpageR.search(text) if m: self._isLoggedIn[index] = True
pywikipedia-svn@lists.wikimedia.org