请求接口时遇到了一些问题,报错如下:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘xxx.com’, port=443): Max retries exceeded with url: ‘xxx.com’ (Caused by ProxyError(‘Cannot connect to proxy.’, RemoteDisconnected(‘Remote end closed connection without response’,)))
代理出现了一些问题。
解决方法
proxies = {"http":None,"https":None}
resp = s.post('xxx.com',files=file,proxies=proxies)