http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9243
Revision: 9243 Author: xqt Date: 2011-05-12 14:18:20 +0000 (Thu, 12 May 2011) Log Message: ----------- Separator for TextfilePageGenerator
Modified Paths: -------------- trunk/pywikipedia/pagegenerators.py
Modified: trunk/pywikipedia/pagegenerators.py =================================================================== --- trunk/pywikipedia/pagegenerators.py 2011-05-12 05:08:12 UTC (rev 9242) +++ trunk/pywikipedia/pagegenerators.py 2011-05-12 14:18:20 UTC (rev 9243) @@ -769,6 +769,8 @@ f.seek(0) for title in f: title = title.strip() + if '|' in title: + title = title[:title.index('|')] if title: yield pywikibot.Page(site, title) f.close()
pywikipedia-svn@lists.wikimedia.org