proxy = urllib2.ProxyHandler({'http': '127.0.0.1'})
opener = urllib2.build_opener(proxy)
urllib2.install_opener(opener)
urllib2.urlopen('http://www.google.com')
More Related Contents:
- Using an HTTP PROXY – Python [duplicate]
- How can I use a SOCKS 4/5 proxy with urllib2?
- How to download image using requests
- What are the differences between the urllib, urllib2, urllib3 and requests module?
- Downloading a picture via urllib and python
- Running Selenium Webdriver with a proxy in Python
- How to connect to Tor browser using Python
- Does python urllib2 automatically uncompress gzip data fetched from webpage?
- Python: URLError:
- A good way to get the charset/encoding of an HTTP response in Python
- How do I prevent Python’s urllib(2) from following a redirect
- Python URLLib / URLLib2 POST
- Python urllib2 with keep alive
- How to use pip on windows behind an authenticating proxy
- Python urllib over TOR? [duplicate]
- Fetch a Wikipedia article with Python
- Python Requests: Post JSON and file in single request
- Pip not working behind firewall
- opening websites using urllib2 from behind corporate firewall – 11004 getaddrinfo failed
- Source interface with Python and urllib2
- How to get around python requests SSL and proxy error?
- Python 3 urllib produces TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str
- Python POST binary data
- How to get the URL of a redirect with Python
- urllib2 file name
- Using urllib2 with SOCKS proxy
- Why do I get “‘str’ object has no attribute ‘read'” when trying to use `json.load` on a string? [duplicate]
- how to follow meta refreshes in Python
- Multiprocessing useless with urllib2?
- How to resolve URLError: