Skip to content

Commit

Permalink
Handle case when title not present, closes #56
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Dec 28, 2024
1 parent 9fbb252 commit a68d36c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/python/paperetl/file/tei.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def parse(stream, source):

soup = BeautifulSoup(stream, "lxml")

title = soup.title.text
title = soup.find("title")
title = title.text if title and title.text else None

# Extract article metadata
(
Expand Down

0 comments on commit a68d36c

Please sign in to comment.