Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- proxies = {
- 'http': 'http://user:pass@10.10.1.0:3128',
- 'https': 'http://user:pass@10.10.1.0:3128',
- }
- # Create the session and set the proxies.
- s = requests.Session()
- s.proxies = proxies
- # Make the HTTP request through the session.
- r = s.get('http://www.showmemyip.com/')
- # Check if the proxy was indeed used (the text should contain the proxy IP).
- print(r.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement