Revision: 5980 Author: filnik Date: 2008-10-16 13:02:32 +0000 (Thu, 16 Oct 2008)
Log Message: ----------- Bugfix: do not check in the <pre> or <nowiki> fields
Modified Paths: -------------- trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2008-10-16 05:12:44 UTC (rev 5979) +++ trunk/pywikipedia/checkimages.py 2008-10-16 13:02:32 UTC (rev 5980) @@ -1391,6 +1391,10 @@ except wikipedia.IsRedirectPage: wikipedia.output(u"The file description for %s is a redirect?!" % imageName) continue + # Delete the fields where the templates cannot be loaded + regex_nowiki = re.compile(r'<nowiki>(.*?)</nowiki>', re.DOTALL) + regex_pre = re.compile(r'<pre>(.*?)</pre>', re.DOTALL) + g = regex_nowiki.sub('', g); g = regex_pre.sub('', g) # Check on commons if there's already an image with the same name if commonsActive == True: response = mainClass.checkImageOnCommons()