Requests in Python 3.6 - error 407

Posted almost 7 years ago by mo liwei

Post a topic
Un Answered
m
mo liwei

python 3.6.3

requests 2.18.4

I saw one issue that mentioned upgrading 'requests',

but python3's 'requests' version was only 2.18.4



import requestsurl = "http://www.github.com" proxy_host = "proxy.crawlera.com" proxy_port = "8010" proxy_auth = "<APIKEY>:" proxies = {"https": "https://{}@{}:{}/".format(proxy_auth, proxy_host, proxy_port), "http": "http://{}@{}:{}/".format(proxy_auth, proxy_host, proxy_port)}r = requests.get(url, proxies=proxies, verify=False, allow_redirects=False)

1 Votes


2 Comments

Sorted by
nestor

nestor posted almost 7 years ago Admin

Try removing allow_redirects=False, the link you provided returns a redirect.

0 Votes

m

mo liwei posted almost 7 years ago

0 Votes

Login to post a comment