Can't get python requests to work with proxies

后端 未结 1 777
傲寒
傲寒 2021-01-16 15:13

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\         


        
相关标签:
1条回答
  • 2021-01-16 15:52

    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)
    
    0 讨论(0)
提交回复
热议问题