diff --git a/scholarly/publication_parser.py b/scholarly/publication_parser.py index 50ff1e4..297360a 100644 --- a/scholarly/publication_parser.py +++ b/scholarly/publication_parser.py @@ -316,7 +316,8 @@ def fill(self, publication: Publication)->Publication: publication['bib']['pub_year'] = arrow.get(val.text, patterns).year except ValueError: # fallback to regex year extraction if arrow fails - publication['bib']['pub_year'] = re.search(r'\d{4}', val.text).group() + match = re.search(r'\d{4}', val.text) + publication['bib']['pub_year'] = match.group() if match else "" publication['bib']['pub_date'] = val.text elif key == 'description': # try to find all the gsh_csp if they exist