测试场景:出于公司对服务器的安全管理
1、普通代理设置
import requests
proxies = {
"http":"http://127.0.0.1:8888",
"https":"https://127.0.0.1:8888"
}
response = requests.get(url="http:XXX",
proxies=proxies)
print(response.text)
2、加密代理设置
proxies = {
"http":"http://username:password@127.0.0.1:8888",
"https":"https://username:password@127.0.0.1:8888"
}