Update CHERWIN_TOOLS.py

版本地址检测修改为gitee
This commit is contained in:
CHERWING 2024-07-23 20:01:59 +08:00 committed by GitHub
parent d6865a8aed
commit a2d5d2071e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@ import requests
from http import HTTPStatus
from datetime import datetime
NOW_TOOLS_VERSION = '2024.07.23'
NOW_TOOLS_VERSION = '2024.07.24'
if os.path.isfile('DEV_ENV.py'):
import DEV_ENV
@ -336,9 +336,9 @@ def RESTART_SCRIPT(RESTART_SCRIPT_NAME):
def CHECK():
global CHERWIN_SCRIPT_CONFIG
print('>>>>>>>开始获取版本信息...')
baseurl = 'https://mirror.ghproxy.com/https://github.com/CHERWING/CHERWIN_SCRIPTS/raw/main/'
baseurl = 'https://gitee.com/cherwin/CHERWIN_SCRIPTS/raw/main/'
TOOLS_NAME = 'CHERWIN_TOOLS.py'
server_script_url = f'https://mirror.ghproxy.com/https://github.com/CHERWING/CHERWIN_SCRIPTS/raw/main/{TOOLS_NAME}'
server_script_url = f'https://gitee.com/cherwin/CHERWIN_SCRIPTS/raw/main/{TOOLS_NAME}'
try:
response = requests.get(f'{baseurl}CHERWIN_SCRIPT_CONFIG.json', verify=False)
response.encoding = 'utf-8'
@ -497,7 +497,7 @@ def get_ip():
def main(APP_NAME, local_script_name, ENV_NAME, local_version, need_invite=False):
global APP_INFO, TIPS, TIPS_HTML
git_url = f'https://mirror.ghproxy.com/https://github.com/CHERWING/CHERWIN_SCRIPTS/raw/main/{local_script_name}'
git_url = f'https://gitee.com/cherwin/CHERWIN_SCRIPTS/raw/main/{local_script_name}'
if CHECK():
APP_INFO = CHERWIN_SCRIPT_CONFIG.get("APP_CONFIG", {}).get(ENV_NAME, {})
# print(APP_INFO)