Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib3
- # Build headers for the basic_auth component
- auth_creds = urllib3.util.make_headers(proxy_basic_auth="username:password")
- # Create a Proxy Manager for managing proxy servers
- proxy = urllib3.ProxyManager("http://75.89.101.60:80", proxy_headers=auth_creds)
- # Make GET request through the proxy
- response = proxy.request("GET", "http://httpbin.io/ip")
- #Print the returned data
- print(response.data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement