feat: config

This commit is contained in:
Soulter
2023-12-13 18:35:50 +08:00
parent 3ba97ad0dc
commit 0e53c95c06
5 changed files with 226 additions and 170 deletions

View File

@@ -33,9 +33,9 @@ def main():
input("config.yaml 配置文件格式错误,请遵守 yaml 格式。")
# 设置代理
if 'http_proxy' in cfg:
if 'http_proxy' in cfg and cfg['http_proxy'] != '':
os.environ['HTTP_PROXY'] = cfg['http_proxy']
if 'https_proxy' in cfg:
if 'https_proxy' in cfg and cfg['https_proxy'] != '':
os.environ['HTTPS_PROXY'] = cfg['https_proxy']
os.environ['NO_PROXY'] = 'cn.bing.com,https://api.sgroup.qq.com'