Revision: 6119
Author: filnik
Date: 2008-11-25 18:43:39 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
Bugfix for blocked users
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2008-11-25 12:34:03 UTC (rev 6118)
+++ trunk/pywikipedia/welcome.py 2008-11-25 18:43:39 UTC (rev 6119)
@@ -490,7 +490,7 @@
pathWiki = wsite.family.nicepath(wsite.lang)
#A little function to check if the user has already been blocked (to skip him).
reg = r"""<li>\d\d:\d\d, \d(\d)? (.*?) \d\d\d\d <a
href=\"""" + re.escape(pathWiki) + \
- r"""(.*?)\" title=\"(.*?)\">(.*?)</a>
\(<a href=\"""" + re.escape(pathWiki) +
r"""(.*?)\"
title=\"(.*?)\">(.*?)</a>"""
+ r"""(.*?)\" title=\"(.*?)\">(.*?)</a>
<span class=\"mw-usertoollinks\">"""
block_text = wsite.getUrl(wsite.path() +
'?title=Special:Log/block&page=User:' + username)
numblock = re.findall(reg, block_text)
# If the bot doesn't find block-line (that means the user isn't blocked), it
will return False otherwise True.
Show replies by date