http and https in crawler IP proxy

Before using the proxy IP, the constructed proxies have always been in http mode

proxies={"http": "http://{}".format(ip)}

But the website I encountered today is of the http type, and the result is an error. After that, I changed the http in the proxies to https and it was successful.

That is to say, there is a rule. When using a proxy, specify http mode to only access URLs that begin with https, and specify https mode to only access URLs that begin with http.

But, WHY?

It is recommended to read the requests source code!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325564562&siteId=291194637