Revision: 4876 Author: rotem Date: 2008-01-13 18:44:01 +0000 (Sun, 13 Jan 2008)
Log Message: ----------- (bug 1870285) The bot should recognize links to obsolete languages that are no longer listed in the valid languages as interwiki links, and match them when removing the language links.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-01-13 18:21:45 UTC (rev 4875) +++ trunk/pywikipedia/wikipedia.py 2008-01-13 18:44:01 UTC (rev 4876) @@ -3046,7 +3046,9 @@ return text # This regular expression will find every interwiki link, plus trailing # whitespace. - languageR = '|'.join(site.validLanguageLinks()) + validLinks = site.validLanguageLinks() + validLinks.extend(site.family.obsolete.keys()) + languageR = '|'.join(validLinks) interwikiR = re.compile(r'[[(%s)\s?:[^]]*]][\s]*' % languageR, re.IGNORECASE) text = replaceExcept(text, interwikiR, '',