Created
October 3, 2012 10:27
-
-
Save takaki/3826270 to your computer and use it in GitHub Desktop.
HTTPS connection with urllib2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import urllib2 | |
proxy_handler = urllib2.ProxyHandler({'https': 'http://localhost:8888/'}) | |
opener = urllib2.build_opener(proxy_handler) | |
print opener.open("https://www.google.com/").read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment