Skip to content

Commit

Permalink
Merge pull request #121 from wsdookadr/main
Browse files Browse the repository at this point in the history
[bugfix] improved exception handling in parse_title
  • Loading branch information
benoit74 authored Sep 28, 2023
2 parents 63331c1 + 898fee3 commit 367844d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/warc2zim/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,10 @@ def get_record_mime_type(record):

# ============================================================================
def parse_title(content):
soup = BeautifulSoup(content, "html.parser")
try:
soup = BeautifulSoup(content, "html.parser")
return soup.title.text or ""
except AttributeError:
except Exception:
return ""


Expand Down

0 comments on commit 367844d

Please sign in to comment.