设置请求时的重试规则 import requests from requests.adapters import HTTPAdapter s = requests.Session() a = HTTPAdapter(max_retries=3) b = HTTPAdapter(max_retries=3) #将重试规则挂载到http和https请求 s.mount('http://', a) s.mount('https://', b) 请求Url 上面设置完毕后,通过改Session的请求就可
关于bat的资料多但零碎,记录一下. 1.设置环境变量即时生效:通过重启explorer来实现即时生效(亲测有效) @echo off set curPath=%cd% wmic ENVIRONMENT where "name='path' and username='<system>'" set VariableValue="%curPath%tool\dig;%path%" taskkill /im explorer.exe /f @echo ===