Revision: 5198 Author: filnik Date: 2008-04-08 18:19:02 +0000 (Tue, 08 Apr 2008)
Log Message: ----------- Fixed also welcome.py, change of HTML
Modified Paths: -------------- trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py =================================================================== --- trunk/pywikipedia/welcome.py 2008-04-08 17:41:51 UTC (rev 5197) +++ trunk/pywikipedia/welcome.py 2008-04-08 18:19:02 UTC (rev 5198) @@ -385,7 +385,7 @@ # and i put them in a list (i find it more easy and secure). while 1: # FIXME: That's the regex, if there are problems, take a look here. - reg = r'(<a href="/w/index.php?title=%s(?P<user>.*?)&(?:amp;|)action=(?:edit|editredlink|edit&redlink=1)"' % talk + reg = r'(<a href="/w/index.php?title=%s(?P<user>.*?)&(?:amp;|)action=(?:edit|editredlink|edit&redlink=1)"' % talk p = re.compile(reg, re.UNICODE) x = p.search(raw, pos) if x == None: @@ -749,7 +749,10 @@ 'Say hi', 'Hi', 'hi', 'h', 'hello', 'Hello')
# The URL for new users is the same in every project. It should not be changed. - URL = "/w/index.php?title=Special:Log&type=newusers&limit=%d&offset=%d" % (limit, offset_variable) + if offset_variable == 0: + URL = "/w/index.php?title=Special:Log&type=newusers&limit=%d" % limit + else: + URL = "/w/index.php?title=Special:Log&type=newusers&limit=%d&offset=%d" % (limit, offset_variable) log = wsite.getUrl(URL) wikipedia.output(u'Loading latest %s new users from %s...\n' % (limit, wsite.hostname())) # Determine which signature to use