#代理设置
import requests
proxies={ #没代理需要先开代理
“http://127.0.0.1:8080”,
“https://127.0.0.1:8080”,
}
response=requests.get(‘https://www.baidu.com’,proxies=proxies)
print(response.status_code)
proxies={
“http”:“http://user:password@127.0.0.1:8080”,
}
response = requests.get(‘https://www.taobao.com’,proxies = proxies)
print(response.status_code)