Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions adsingestp/parsers/jats.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,15 @@ def parse(self, article_metadata):
if contrib.find("collab") and contrib.find("collab").find(
"institution"
):
collabtag = copy(contrib.find("collab").find("institution"))
collab_text = (
contrib.find("collab").find("institution").decode_contents()
)
elif collab_name:
collab_text = collab_name
else:
collabtag = None

if not collabtag and collab_name:
collabtag_string = "<collab>" + collab_name + "</collab>"
collab_text = None
if collab_text:
collabtag_string = "<collab>" + collab_text + "</collab>"
collabtag = bs4.BeautifulSoup(collabtag_string, "xml").collab

if not collabtag:
Expand All @@ -400,10 +403,6 @@ def parse(self, article_metadata):
# check if collabtag is present in the author author attributes
collab = contrib.find("collab")

# Springer collab info for nested authors is given as <institution>
if not collab:
collab = contrib.find("institution")

if collab:
if type(collab.contents[0].get_text()) == str:
collab_name = collab.contents[0].get_text().strip()
Expand Down
Loading