我试图使用Python 3.8和Requests包从RKI website in Germany下载excel文件,但出现以下错误:
ProxyError: HTTPSConnectionPool(host='www.rki.de', port=443): Max retries exceeded with url: /DE/Content/InfAZ/N/Neuartiges_Coronavirus/Daten/Fallzahlen_Kum_Tab.xlsx?__blob=publicationFile (Caused by ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory')))
The link is correct,并在单击时工作
我的代码是:
import requests
resp = requests.get(r"https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Daten/Fallzahlen_Kum_Tab.xlsx",
verify=False,
params = {"__blob": "publicationFile"})
RKI.de/Robots.txt看起来像:
User-agent: * Disallow: /SharedDocs/Personen/ Disallow: /SharedDocs/Kontaktdaten/ Disallow: /SharedDocs/Kontaktformulare/ Disallow: /SiteGlobals/ Disallow: /DE/Service/ Disallow: /EN/Service/ Allow: /SiteGlobals/Functions/JavaScript/ Allow: /SiteGlobals/StyleBundles/ Allow: /SiteGlobals/Frontend/ Crawl-delay: 10
我对这类事情没有经验。也许这是不可能的
它对我有用,可能有用
其他:
代理:
授权取决于代理服务器
试试这个代码
相关问题 更多 >
编程相关推荐