mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Web: Add early returns on exception when snarfing titles.
Closes GH-1390.
This commit is contained in:
parent
9291fbd4a0
commit
1a1707420b
@ -158,6 +158,7 @@ class Web(callbacks.PluginRegexp):
|
||||
Raise=True)
|
||||
else:
|
||||
self.log.info('Web plugin TitleSnarfer: URL <%s> raised <%s>', url, str(e))
|
||||
return
|
||||
try:
|
||||
text = text.decode(utils.web.getEncoding(text) or 'utf8',
|
||||
'replace')
|
||||
@ -170,6 +171,7 @@ class Web(callbacks.PluginRegexp):
|
||||
self.log.info('Web plugin TitleSnarfer: URL <%s> Could '
|
||||
'not guess the page\'s encoding. (Try '
|
||||
'installing python-charade.)', url)
|
||||
return
|
||||
try:
|
||||
parser = Title()
|
||||
parser.feed(text)
|
||||
|
Loading…
Reference in New Issue
Block a user