Answers for "use proxy to send request python"

9

python requests get proxy

import requests

proxies = { "http": "http://10.10.10.10:8000",
           "https": "https://10.10.10.10:8000"
}
r = requests.get("http://toscrape.com", proxies=proxies)
Posted by: Guest on March-06-2020
0

proxy request python

# Linux | Mac
$ export HTTP_PROXY="http://10.10.1.10:3128"
$ export HTTPS_PROXY="http://10.10.1.10:1080"
# Windows: Not tested
$ set HTTP_PROXY="http://10.10.1.10:3128"
$ set HTTPS_PROXY="http://10.10.1.10:1080"

$ python
>>> import requests
>>> requests.get("http://example.org")
Posted by: Guest on November-04-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language