pwb.py harvest_template -template:foo "Bar" P18
when P18 should be type image
and in infobox is
| Bar = <!-- some comment -->
Bot crashes
ERROR: u'<!-- some comment -->' contains illegal char(s) u'<'
Traceback (most recent call last):
File "I:\pwb\pywikibot\bot.py", line 1927, in run
self.treat(page, item)
File ".\scripts\harvest_template.py", line 193, in treat
image = pywikibot.FilePage(imagelink)
File "I:\pwb\pywikibot\tools\__init__.py", line 1327, in wrapper
return obj(*__args, **__kw)
File "I:\pwb\pywikibot\page.py", line 2182, in __init__
if self.namespace() != 6:
File "I:\pwb\pywikibot\page.py", line 176, in namespace
return self._link.namespace
File "I:\pwb\pywikibot\page.py", line 5003, in namespace
self.parse()
File "I:\pwb\pywikibot\page.py", line 4947, in parse
u"%s contains illegal char(s) %s" % (repr(t), repr(m.group(0))))
InvalidTitle: u'<!-- some comment -->' contains illegal char(s) u'<'Additionally, when there is
| Bar = <!-- some [[comment]] -->, bot incorrectly adds [[comment]] intead of skipping