mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-26 14:10:20 +00:00
fix some parser errors not being caught by bail out process
This commit is contained in:
parent
74b99fe9eb
commit
bb5879a4f7
1 changed files with 5 additions and 2 deletions
|
@ -70,8 +70,11 @@ def parse_links(path):
|
|||
links += list(parser_func(file))
|
||||
if links:
|
||||
break
|
||||
except (ValueError, TypeError, IndexError, AttributeError, etree.ParseError) as err:
|
||||
# parser not supported on this file
|
||||
except Exception as err:
|
||||
# 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))
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue