我正在使用pybliometrics,这是Scopus API的Python接口,用于下载一些论文的摘要。
不幸的是,Scopus只在订阅它的大学的网络中工作。我现在在家,每当我尝试使用pybliometrics下载一些东西时,它都会给我以下错误:
pybliometrics.scopus.exception.Scopus401Error: The requestor is not authorized to access the requested view or fields of the resource我需要使用我的大学的代理服务器才能使用我的大学的IP地址进入互联网。代理有一个可用的WPAD配置文件,但我不知道如何在pybliometrics中使用它。pybliometrics documentation要求在配置文件中添加一个块,如下所示:
[Proxy]
ftp = socks5://127.0.0.1:1234
http = socks5://127.0.0.1:1234
https = socks5://127.0.0.1:1234但此代理需要身份验证。如何指定代理用户名和密码?
编辑:我尝试过在config.ini中设置块,如下所示:
[Proxy]
ftp = http://username:password@proxy.thing.it:8080
http = http://username:password@proxy.thing.it:8080
https = http://username:password@proxy.thing.it:8080但它仍然失败,并显示以下错误消息:
requests.exceptions.ProxyError: HTTPSConnectionPool(host='api.elsevier.com', port=443): Max retries exceeded with url: /content/abstract/scopus_id/84983158344?view=META_ABS (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))发布于 2020-06-18 19:09:23
从我们的角度来看,只要正确配置了代理,API就会通过代理工作。我建议您与代理的提供商谈谈,看看他们是否能提供帮助。
我们没有关于如何通过代理使用API的具体说明(因为有许多潜在的不同版本和潜在的配置);但是,一般说明如下:
https://service.elsevier.com/app/answers/detail/a_id/29026/supporthub/elsevieraccess/
发布于 2020-08-27 15:07:35
对我来说,你的新代理代码块看起来很可疑。它也通过http发送ftp和https请求。也许可以在相应的部分尝试使用ftp和https作为协议。
另一种解决方案是请求Scopus Integration Support提供InstToken,您可以使用它而不是代理。然后,您还可以在配置文件中指定InstToken。
https://stackoverflow.com/questions/62262233
复制相似问题