1import requests
2
3proxies = { "http": "http://10.10.10.10:8000",
4 "https": "https://10.10.10.10:8000"
5}
6r = requests.get("http://toscrape.com", proxies=proxies)
7
1import requests
2
3proxies = {
4 "http": "http://10.10.1.10:3128",
5 "https": "https://10.10.1.10:1080",
6}
7
8requests.get("http://example.org", proxies=proxies)
1s = requests.Session()
2
3s.get('https://httpbin.org/cookies/set/sessioncookie/123456789')
4r = s.get('https://httpbin.org/cookies')
5
6print(r.text)
7# '{"cookies": {"sessioncookie": "123456789"}}'
8
1from proxy_requests import ProxyRequests
2
3r = ProxyRequests('url here')
4r.set_headers({'name': 'rootVIII', 'secret_message': '7Yufs9KIfj33d'})
5r.post_with_headers({'key1': 'value1', 'key2': 'value2'})