Created
September 9, 2015 15:24
-
-
Save maksymx/79880fe400fc316c11af to your computer and use it in GitHub Desktop.
Urllib2 opener via 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 urllib2 | |
proxy_server = 'http://username:password@ip_address:port' | |
proxy_handler = urllib2.ProxyHandler({"http": proxy_server, "https": proxy_server}) | |
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookie_jar), proxy_handler) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment