from urllib2 import ProxyHandler, build_opener proxyMap = {'https': 'http://(user):(pass)@(proxyhost):(proxypass)/'} proxy = ProxyHandler(proxyMap) opener = build_opener(proxy) u = opener.open('https://somehttpspage') data = u.read() charset = u.info().getparam('charset') # Python 2 print 'CharSet %s' % charset print '------------------------------------------------------------------------' print data
Wednesday, October 20, 2010
Python: Accessing https pages from behing an authenticating proxy server
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment