首页 > Web开发 > 详细

urllib3 ProxyManager

时间:2016-03-16 18:51:48      阅读:458      评论:0      收藏:0      [点我收藏+]

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

技术分享

urllib3 ProxyManager

原文:http://www.cnblogs.com/shadowwalker/p/5284353.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!