背景:访问https接口,使用http代理
版本:requests: 2.31.0
从报错可以看出,是proxy相关的报错
调整代码,设定不使用代理,将http与https对应的proxy值置空即可(尝试过proxies = {},但此写法不生效)
proxies = { 'http': '', 'https': '' }标签:OSError,Tunnel,报错,proxy,https,requests,proxies From: https://www.cnblogs.com/uoky/p/18325478response
=
requests.get(
'https://xxxx'
, proxies
=proxies
, verify
=
False
)