Revision: 8585 Author: russblau Date: 2010-09-20 16:34:04 +0000 (Mon, 20 Sep 2010)
Log Message: ----------- improve parsing of interwiki prefixes that point to the source wiki family
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2010-09-20 07:10:00 UTC (rev 8584) +++ branches/rewrite/pywikibot/page.py 2010-09-20 16:34:04 UTC (rev 8585) @@ -2191,6 +2191,11 @@ return (fam.name, prefix) known = fam.get_known_families(site=self._source) if prefix in known: + if known[prefix] == fam.name: + # interwiki prefix links back to source family + t = t[t.index(u":")+1: ].lstrip(u" ") + # strip off the prefix and retry + continue # prefix is a different wiki family return (known[prefix], code) break