urllib3 ProxyManager
时间:2016-03-16 18:54:02
收藏:0
阅读:1569
ProxyManager is an HTTP proxy-aware subclass of PoolManager. It produces a single
HTTPConnectionPool instance for all HTTP connections and individual per-server:port
HTTPSConnectionPool instances for tunnelled HTTPS connections.
headers = urllib3.make_headers(proxy_basic_auth=’myusername:mypassword’) proxy = urllib3.ProxyManager(’http://localhost:3128’, proxy_headers=headers) r = proxy.request(’GET’, ’http://example.com/’) r.status
API

评论(0)