From f8807e65eb94fb6041b9c432266afda1c5dbfa15 Mon Sep 17 00:00:00 2001 From: Adrien Barbaresi Date: Wed, 2 Oct 2024 15:59:14 +0200 Subject: [PATCH] maintenance: remove superfluous RuntimeError catch --- trafilatura/core.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/trafilatura/core.py b/trafilatura/core.py index a853cca9..e822a2b9 100644 --- a/trafilatura/core.py +++ b/trafilatura/core.py @@ -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: