Skip to content

Commit

Permalink
maintenance: remove superfluous RuntimeError catch
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Oct 2, 2024
1 parent f57ef0b commit f8807e6
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions trafilatura/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,13 @@ def extract(filecontent, url=None, record_id=None, no_fallback=False,
)

# extraction
try:
document = bare_extraction(
filecontent, options=options,
as_dict=False, prune_xpath=prune_xpath,
)
except RuntimeError:
LOGGER.error('Processing timeout for %s', url)
document = None
document = bare_extraction(
filecontent, options=options,
as_dict=False, prune_xpath=prune_xpath,
)

# post-processing
if document is None:
if not document:
return None

if options.format not in TXT_FORMATS:
Expand Down

0 comments on commit f8807e6

Please sign in to comment.