使用DOIs(restapi调用)获取交叉引用的元数据有什么解决方案吗

2024-05-23 14:39:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用crossrefrestapi检索Crossref的元数据

我有DOI的CSV文件,我使用python从中获取DOI,并对每个DOI进行API调用,以便从交叉引用中检索元数据。我必须为许多doi获取元数据,但是在获取一些元数据之后,它会导致连接错误

import requests  

response = requests.get("https://api.crossref.org/v1/works/http://dx.doi.org/" + CitedDOI[X])

这是连接错误

HTTPSConnectionPool(host='api.crossref.org', port=443): Max retries exceeded with url: /v1/works/http://dx.doi.org/10.1080/10426910802104344 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000019510E068D0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

Tags: 数据orgapihttphost错误doiconnection