1.创建try_proxies.py文件
import requests
proxies = {"http":"http:117.135.34.6:8060"}
headers={"User-Agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Mobile Safari/537.36"}
result = requests.get("https://www.baidu.com",proxies=proxies,headers=headers)
print(result.status_code)
2.运行try_proxies.py文件
源码:百度网盘路径:https://pan.baidu.com/s/1gs92UFpprK4cEmVGnTf6Gw,提取码:43za
米扑代理:https://proxy.mimvp.com/free.php