requests 使用 proxies 代理时ValueError: check_hostname requires server_hostname

问题原因:

urllib3的1.26.4版本有个bug
https://github.com/urllib3/urllib3/issues/517

解决办法

urllib3降低版本:urllib3==1.25.7

操作步骤:

打开cmd.
使用 pip uninstall urllib3 卸载urllib3,
使用 pip install urllib3==1.25.7 安装1.25.7版本urllib3 即可解决.

 

posted @ 2021-11-22 02:03  技术改变命运Andy  阅读(213)  评论(0编辑  收藏  举报