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"))
More Related Contents:
- How can I use a SOCKS 4/5 proxy with urllib2?
- How to get around python requests SSL and proxy error?
- Return a requests.Response object from Flask
- How to “log in” to a website using Python’s Requests module?
- Python Requests throwing SSLError
- Python Requests and persistent sessions
- Using pip behind a proxy with CNTLM
- Python Requests library redirect new url
- MaxRetryError: HTTPConnectionPool: Max retries exceeded (Caused by ProtocolError(‘Connection aborted.’, error(111, ‘Connection refused’)))
- Can I set max_retries for requests.request?
- How to use cookies in Python Requests
- using requests with TLS doesn’t give SNI support
- Python Request Post with param data
- Proxy awareness with pip
- python ignore certificate validation urllib2
- Using Python Requests: Sessions, Cookies, and POST
- Only download a part of the document using python requests
- OpenSSL errors in python requests
- Python – Requests, Selenium – passing cookies while logging in
- Python : Trying to POST form using requests
- How to get response SSL certificate from requests in python?
- How to get pip to work behind a proxy server [duplicate]
- Send http request through specific network interface
- How to resume file download in Python?
- parsing XML file gets UnicodeEncodeError (ElementTree) / ValueError (lxml)
- What is the difference between ‘content’ and ‘text’
- parse multipart/form-data, received from requests post
- How to get the raw content of a response in requests with Python?
- How to disable cookie handling with the Python requests library?
- Python 3: using requests does not get the full content of a web page