mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-18 12:21:42 +02:00
fix some parser errors not being caught by bail out process
This commit is contained in:
@@ -70,8 +70,11 @@ def parse_links(path):
|
|||||||
links += list(parser_func(file))
|
links += list(parser_func(file))
|
||||||
if links:
|
if links:
|
||||||
break
|
break
|
||||||
except (ValueError, TypeError, IndexError, AttributeError, etree.ParseError) as err:
|
except Exception as err:
|
||||||
# parser not supported on this file
|
# we try each parser one by one, each parser will throw exeption an exception if unsupported
|
||||||
|
# so we accept the first one that doesn't throw any exceptions and produces some non-0 output.
|
||||||
|
# uncomment the following line to see why the parser was unsupported for each attempted format
|
||||||
|
|
||||||
# print('[!] Parser {} failed: {} {}'.format(parser_name, err.__class__.__name__, err))
|
# print('[!] Parser {} failed: {} {}'.format(parser_name, err.__class__.__name__, err))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user