Revision: 7891 Author: xqt Date: 2010-01-25 12:56:41 +0000 (Mon, 25 Jan 2010)
Log Message: ----------- Bot breaks categories if link contains a template, see http://la.wikipedia.org/w/index.php?title=997_Priska&diff=prev&oldid=1038880 (bugfix) Modified Paths: -------------- trunk/pywikipedia/wikipedia.py Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-01-25 09:36:56 UTC (rev 7890) +++ trunk/pywikipedia/wikipedia.py 2010-01-25 12:56:41 UTC (rev 7891) @@ -445,7 +445,11 @@ break sectionStart = t.find(u'#') - if sectionStart > 0: + # Categories does not have sections. + # But maybe there are magic words like {{#time|}} + # TODO: recognize magic word and templates inside links + # see http://la.wikipedia.org/w/index.php?title=997_Priska&diff=prev&oldid=1038880 + if sectionStart > 0 and self._namespace not in [14]: self._section = t[sectionStart+1 : ].lstrip(" ") self._section = sectionencode(self._section, self.site().encoding()) _______________________________________________ Pywikipedia-svn mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn
