import requests

s = requests.Session()

s.trust_env = False

This will prevent requests getting any information from its environment: specifically, it'll disable environment searches for proxies and for certificate bundles.

参考: 

Proxy bypass detection could add delay of ~4.5 seconds to each request

文章转载于:https://www.cnblogs.com/BigFishFly/p/6622831.html

原著是一个有趣的人,若有侵权,请通知删除

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《requests.session之set trust_env to disable environment searches for proxies
   

还没有人抢沙发呢~