Skip to content Skip to sidebar Skip to footer

Can't Get Python Requests To Work With Proxies

I am trying to do a simple get request through a proxy server: import requests test=requests.get('http://google.com', proxies={'http': '112.5.254.30:80'}) print test.text The addr

Solution 1:

I know its an old question, but it should be

import requests
test=requests.get("http://google.com", proxies={"http":"http://112.5.254.30:80","https": "http://112.5.254.30:80"})

print (test.text)

Post a Comment for "Can't Get Python Requests To Work With Proxies"