[Pywikipedia-l] SVN: [4843] trunk/pywikipedia/noreferences.py

wikipedian at svn.wikimedia.org wikipedian at svn.wikimedia.org
Thu Jan 10 12:26:50 UTC 2008


Revision: 4843
Author:   wikipedian
Date:     2008-01-10 12:26:49 +0000 (Thu, 10 Jan 2008)

Log Message:
-----------
while parsing the XML dump, ignore commented-out parts

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

Modified: trunk/pywikipedia/noreferences.py
===================================================================
--- trunk/pywikipedia/noreferences.py	2008-01-10 01:52:11 UTC (rev 4842)
+++ trunk/pywikipedia/noreferences.py	2008-01-10 12:26:49 UTC (rev 4843)
@@ -138,7 +138,8 @@
         mysite = wikipedia.getSite()
         dump = xmlreader.XmlDump(self.xmlFilename)
         for entry in dump.parse():
-            if self.refR.search(entry.text) and not self.referencesR.search(entry.text):
+            text = wikipedia.removeDisabledParts(entry.text)
+            if self.refR.search(text) and not self.referencesR.search(text):
                 yield wikipedia.Page(mysite, entry.title)
 
 class NoReferencesBot:





More information about the Pywikipedia-l mailing list