我想使用 Elsevier Article Retrieval API ( https://dev.elsevier.com/documentation/FullTextRetrievalAPI.wadl ) 来获取论文的全文。
我使用httpx来获取论文的信息,但它只包含一些信息。我的代码如下:
import httpx
import time
def scopus_paper_date(paper_doi,apikey):
apikey=apikey
headers={
"X-ELS-APIKey":apikey,
"Accept":'text/xml'
}
timeout = httpx.Timeout(10.0, connect=60.0)
client = httpx.Client(timeout=timeout,headers=headers)
query="&view=FULL"
url=f"https://api.elsevier.com/content/article/doi/" + paper_doi
r=client.get(url)
print(r)
return r.text
y = scopus_paper_date('10.1016/j.solmat.2021.111326',myapikey)
y
结果如下:
<full-text-retrieval-response xmlns="http://www.elsevier.com/xml/svapi/article/dtd" xmlns:bk="http://www.elsevier.com/xml/bk/dtd" xmlns:cals="http://www.elsevier.com/xml/common/cals/dtd" xmlns:ce="http://www.elsevier.com/xml/common/dtd" xmlns:ja="http://www.elsevier.com/xml/ja/dtd" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:sa="http://www.elsevier.com/xml/common/struct-aff/dtd" xmlns:sb="http://www.elsevier.com/xml/common/struct-bib/dtd" xmlns:tb="http://www.elsevier.com/xml/common/table/dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xocs="http://www.elsevier.com/xml/xocs/dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:prism="http://prismstandard.org/namespaces/basic/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><coredata><prism:url>https://api.elsevier.com/content/article/pii/S0927024821003688</prism:url>....
我怎样才能获得论文的完整数据,非常感谢!