运行时出现requests.exceptions.ProxyError错误
来源:2-3 加入代理逻辑隐藏爬虫 使用多进程加速抓取

秋晨001
2019-12-26
求救!当我尝试运行时出现:requests.exceptions.ProxyError: HTTPSConnectionPool(host=‘www.lagou.com’, port=443): Max retries exceeded with url: /jobs/allCity.html (Caused by ProxyError(‘Cannot connect to proxy.’, OSError(‘Tunnel connection failed: 402 Payment Required’)))错误
当我在请求中加入verify=False时又报了TypeError: request() got multiple values for keyword argument ‘verify’
写回答
1回答
-
秋晨001
提问者
2019-12-26
问题解决了,
老师提供的代理似乎已经不好用了,所以会出现第一个问题,把代理去掉就行了或者换个代理也行
session的get方法中有verify = False所以在get方法的参数中就没必要再加verify参数了,否则就会出现给函数的一个参数多次赋值的问题
00
相似问题