I'm using the great Requests library in my Python script:
import requests
r = requests.get("some-site.com")
print r.text
I would like to use socks proxy. But Requests only supports HTTP proxy now.
How can I do that?
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'))