第1种方法
1
2
3
session = requests.Session()
session.trust_env = False
response = session.get('http://httpbin.org/')
第2种方法
1
2
proxies = { "http": None, "https": None}
requests.get("http://httpbin.org/", proxies=proxies)
1
2
3
session = requests.Session()
session.trust_env = False
response = session.get('http://httpbin.org/')
1
2
proxies = { "http": None, "https": None}
requests.get("http://httpbin.org/", proxies=proxies)