Python 是否存在使用DOIs(RESTAPI调用)获取Crossref元数据的解决方案

Python 是否存在使用DOIs(RESTAPI调用)获取Crossref元数据的解决方案,python,python-requests,Python,Python Requests,我正在使用crossrefrestapi检索Crossref的元数据 我有一个DOI的CSV文件,我使用python从中获取DOI,并对每个DOI进行API调用,以从Crossref检索元数据。我必须为许多DOI获取元数据,但在检索一些元数据后,它会导致连接错误 import requests response = requests.get("https://api.crossref.org/v1/works/http://dx.doi.org/" + CitedDOI[X]) HTTP

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

我有一个DOI的CSV文件,我使用python从中获取DOI,并对每个DOI进行API调用,以从Crossref检索元数据。我必须为许多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'))
这是连接错误

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'))
HTTPSConnectionPool(host='api.crossref.org',port=443):url超过最大重试次数:/v1/works/http://dx.doi.org/10.1080/10426910802104344 (由NewConnectionError(':建立新连接失败:[WinError 10060]连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立的连接失败,因为连接的主机没有响应”)
试试看

我还建议您查看。规则有时会改变,但现在你可以通过

  • 在标题中包含您的电子邮件地址
  • 在一次呼叫中请求多个DOI
  • 多线程请求(写入时限制为每秒50个请求)
试试看

我还建议您查看。规则有时会改变,但现在你可以通过

  • 在标题中包含您的电子邮件地址
  • 在一次呼叫中请求多个DOI
  • 多线程请求(写入时限制为每秒50个请求)