Skip to content

Commit

Permalink
Merge pull request #45 from seasidesparrow/xref-affil.2023Apr06
Browse files Browse the repository at this point in the history
Fix for issue #44 (Author affiliation data in crossref)
  • Loading branch information
seasidesparrow authored Jun 29, 2023
2 parents 3975a67 + 7d0291a commit 714b9a8
Show file tree
Hide file tree
Showing 7 changed files with 2,194 additions and 21 deletions.
5 changes: 5 additions & 0 deletions adsingestp/parsers/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ def _parse_contrib(self):
orcid = orcid.replace("http://orcid.org/", "")
contrib_tmp["orcid"] = orcid

if c.find("affiliation"):
affil = [a.get_text() for a in c.find_all("affiliation")]
if affil:
contrib_tmp["aff"] = affil

role = c.get("contributor_role", "unknown")

if role == "author":
Expand Down
367 changes: 367 additions & 0 deletions tests/stubdata/input/crossref_10.1146_annurev.energy.25.1.441.xml

Large diffs are not rendered by default.

Loading

0 comments on commit 714b9a8

Please sign in to comment.