requests使用代理
Published on: | Views: 97语法
requests.post(url, proxies={
'http':'http://xxx.xxx.com:8888',
'https':'socks5://xxxxx:9999'
})
问题
在使用socks5代理时提示错误: requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support. 原因是需要安装pysocks库才能支持socks代理:
./venv/bin/pip install pysocks