Revision: 5772 Author: filnik Date: 2008-07-29 10:23:50 +0000 (Tue, 29 Jul 2008)
Log Message: ----------- Fixing Badtitle detection
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-07-28 17:30:53 UTC (rev 5771) +++ trunk/pywikipedia/wikipedia.py 2008-07-29 10:23:50 UTC (rev 5772) @@ -707,7 +707,8 @@ elif self.site().has_mediawiki_message('nocreatetitle') and text.find(self.site().mediawiki_message('nocreatetitle')) != -1: raise NoPage(self.site(), self.aslink(forceInterwiki = True)) # Bad title - elif text.find('var wgPageName = "Special:Badtitle";') != -1: + elif text.find('var wgPageName = "Special:Badtitle";') != -1 \ + or text.find(self.site().mediawiki_message('badtitle')) != -1: raise BadTitle('BadTitle: %s' % self) # find out if the username or IP has been blocked elif self.site().isBlocked():