Fix fetching latest version

URL from HuanLinOTO/GenshinCloudPlayHelper#3
This commit is contained in:
ImAyx 2023-03-08 21:01:30 +08:00 committed by GitHub
parent 86330680dd
commit e834b530bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,8 +31,8 @@ class RunError(Exception):
token = config['token']
client_type = config['type']
try:
ver_info = r.get('https://api-cloudgame-static.mihoyo.com/hk4e_cg_cn/gamer/api/getFunctionShieldNew?client_type=1').text
version = json.loads(ver_info)['data']['config']['cg.key_function_controller']['versions'][-1]
ver_info = r.get('https://sdk-static.mihoyo.com/hk4e_cn/mdk/launcher/api/resource?key=eYd89JmJ&launcher_id=18').text
version = json.loads(ver_info)['data']['game']['latest']['version']
print(f'从官方API获取到云·原神最新版本号{version}')
except:
version = config['version']