指导文档:
http://docs.python-requests.org/en/master/user/advanced/#proxies 的Proxies
http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification 的SSL Cert Verification
1、requests设置代理
import requests
proxies = {'http': 'http://localhost:8888', 'https': 'http://localhost:8888'}
url = 'http://www.baidu.com'
requests.post(url, proxies=proxies, verify=False) #verify是否验证服务器的SSL证书
执行结果: