Revision: 7843 Author: xqt Date: 2009-12-29 11:16:45 +0000 (Tue, 29 Dec 2009)
Log Message: ----------- +page counter for future use
Modified Paths: -------------- trunk/pywikipedia/maintenance/wikimedia_sites.py
Modified: trunk/pywikipedia/maintenance/wikimedia_sites.py =================================================================== --- trunk/pywikipedia/maintenance/wikimedia_sites.py 2009-12-29 11:08:14 UTC (rev 7842) +++ trunk/pywikipedia/maintenance/wikimedia_sites.py 2009-12-29 11:16:45 UTC (rev 7843) @@ -30,17 +30,16 @@ text = f.read()
if family == 'wikipedia': - p = re.compile(r'[[:([a-z-]{2,}):|\1]]') + p = re.compile(r"[[:([a-z-]{2,}):|\1]].*?'''([0-9,]{1,})'''</span>]", re.DOTALL) else: - p = re.compile(r'[http://(%5Ba-z%5C-%5D%7B2,%7D).%s.org/wiki/ \1]' % family) + p = re.compile(r"[http://(%5Ba-z%5C-%5D%7B2,%7D).%s.org/wiki/ \1].*?'''([0-9,]{1,})''']" % family, re.DOTALL)
new = [] - for lang in p.findall(text): + for lang, cnt in p.findall(text): if lang in obsolete or lang in exceptions: # Ignore this language continue new.append(lang) - if original == new: wikipedia.output(u'The lists match!') else:
pywikipedia-svn@lists.wikimedia.org