• 关于
  •   
2022年4月13日 凌晨
222 字 2 分钟 次

让requests支持socks的办法

The modern way:

pip install -U requests[socks]

then

import requests

resp = requests.get(‘http://go.to',

proxies=dict(http=’socks5://user:pass@host:port’,

https=’socks5://user:pass@host:port’))


Python

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!

解决pip安装时被墙或SSLError 上一篇
1.Python解释器 下一篇

 目录

搜索

友情链接:智鹏的个人博客

Hexo Fluid
粤公网安备 44011402000762号 粤ICP备2022067347号-1
总访问量 次 总访客数 人