[Pywikipedia-l] SVN: [6404] trunk/pywikipedia/welcome.py

filnik at svn.wikimedia.org filnik at svn.wikimedia.org
Sat Feb 21 22:03:59 UTC 2009


Revision: 6404
Author:   filnik
Date:     2009-02-21 22:03:59 +0000 (Sat, 21 Feb 2009)

Log Message:
-----------
<li> -> <li class=> -.-' fixed

Modified Paths:
--------------
    trunk/pywikipedia/welcome.py

Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py	2009-02-21 21:14:31 UTC (rev 6403)
+++ trunk/pywikipedia/welcome.py	2009-02-21 22:03:59 UTC (rev 6404)
@@ -442,7 +442,9 @@
         #FIXME: It counts the first 50 edits
         # if number > 50, it won't work
         # (not *so* useful, it should be enough).
-        contribnum = contribs.count('<li>')
+        contribnum = contribs.count('<li class="">')
+        if contribnum == 0:
+            contribnum = contribs.count('<li>')
 
         if contribnum >= number:
             wikipedia.output(u'%s has enough edits to be welcomed' % userpage.titleWithoutNamespace() )
@@ -500,7 +502,7 @@
 
     data = query.GetData(params,
                     useAPI = True, encodeTitle = False)
-     # If there's not the blockedby parameter (that means the user isn't blocked), it will return False otherwise True.
+    # If there's not the blockedby parameter (that means the user isn't blocked), it will return False otherwise True.
     try:
         blockedBy = data['query']['users'][0]['blockedby']
     except KeyError:





More information about the Pywikipedia-l mailing list