Skip to content

Commit fc7ed90

Browse files
View dependent parsing of AuthorRetrieval.affiliation_history
1 parent 4424944 commit fc7ed90

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pybliometrics/scopus/author_retrieval.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ def affiliation_history(self) -> Optional[List[NamedTuple]]:
4444
Note: Unlike on their website, Scopus doesn't provide the periods
4545
of affiliation.
4646
"""
47-
affs = chained_get(self._profile, ["affiliation-history", "affiliation"])
48-
return parse_affiliation(affs)
47+
if self._view in ('STANDARD', 'ENHANCED'):
48+
affs = chained_get(self._profile, ["affiliation-history", "affiliation"])
49+
else:
50+
return None
51+
return parse_affiliation(affs, self._view)
4952

5053
@property
5154
def alias(self) -> Optional[List[str]]:

0 commit comments

Comments
 (0)