Requests in Python 2.7 - error 407

Posted about 7 years ago by spektro

Post a topic
Answered
s
spektro

Does anybody knows why the code proposed on the site:  does not work in python 2.7? 


Every time you run this code I get 407 !!!! 

 

import requests

url = "http://httpbin.org/ip"
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)

 

please help!

0 Votes

nestor

nestor posted about 7 years ago Admin Best Answer

0 Votes


1 Comments

nestor

nestor posted about 7 years ago Admin Answer

0 Votes

Login to post a comment