Catch the proper exception when parsing the title fails.

This commit is contained in:
James Vega 2007-10-04 12:57:00 +00:00
parent f1948a2245
commit 74e06ea52a

View File

@ -96,7 +96,7 @@ class Web(callbacks.PluginRegexp):
parser = Title() parser = Title()
try: try:
parser.feed(text) parser.feed(text)
except sgmllib.SGMLParseError: except HTMLParser.HTMLParseError:
self.log.debug('Encountered a problem parsing %u. Title may ' self.log.debug('Encountered a problem parsing %u. Title may '
'already be set, though', url) 'already be set, though', url)
if parser.title: if parser.title: