Created
July 3, 2015 13:41
-
-
Save fmasanori/24053cd6ac62da786c10 to your computer and use it in GitHub Desktop.
Set HTTP_PROXY
This file contains hidden or 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
import urllib.request as req | |
proxy = req.ProxyHandler({'http': r'http://user:password@ip:port'}) | |
auth = req.HTTPBasicAuthHandler() | |
opener = req.build_opener(proxy, auth, req.HTTPHandler) | |
req.install_opener(opener) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment