Closed gospider007 closed 1 year ago
你好像用的是旧版本的requests,更新到1.1.14版本以后即可正常访问。
最新版1.1.15 报错
Get "https://www.thelancet.com/": stream error: stream ID 1; PROTOCOL_ERROR; server not authoritative for push with host "www.thelancet.com"
最新版1.1.15 报错
Get "https://www.thelancet.com/": stream error: stream ID 1; PROTOCOL_ERROR; server not authoritative for push with host "www.thelancet.com"
你没有用代理,加上代理试试。我这边加上代理就没问题了。
为啥要用代理?这个网站并不需要翻墙就能访问。下面是我用python 正常访问的代码
import requests
a=requests.get("https://www.thelancet.com/")
print(a.text)