From a1d4fe8103efc9c7d3cc87cf0fb10c37b3e99506 Mon Sep 17 00:00:00 2001 From: ssdv1 <160284219+ssdv1@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:48:48 -0500 Subject: [PATCH] Update publication_parser.py --- scholarly/publication_parser.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scholarly/publication_parser.py b/scholarly/publication_parser.py index fa58cbf..d3187aa 100644 --- a/scholarly/publication_parser.py +++ b/scholarly/publication_parser.py @@ -363,6 +363,15 @@ def fill(self, publication: Publication)->Publication: publication['mandates'] = [] self._fill_public_access_mandates(publication) + scholar_bib_id = publication['url_related_articles'].split("q=related:")[1].split(":")[0] + url_scholarbib = f"/scholar?hl=en&q=info:{scholar_bib_id}:scholar.google.com/&output=cite&scirp=0&hl=en" + publication['url_scholarbib']=url_scholarbib + + bibtex_url = self._get_bibtex(publication['url_scholarbib']) + bibtex = self.nav._get_page(bibtex_url) + parser = bibtexparser.bparser.BibTexParser(common_strings=True) + parsed_bib = remap_bib(bibtexparser.loads(bibtex,parser).entries[-1], _BIB_MAPPING, _BIB_DATATYPES) + publication['bib'].update(parsed_bib) publication['filled'] = True elif publication['source'] == PublicationSource.PUBLICATION_SEARCH_SNIPPET: bibtex_url = self._get_bibtex(publication['url_scholarbib'])