更新包获取和b50更新的小改进
This commit is contained in:
@@ -28,8 +28,8 @@ def auth_lite_decrypt(ciphertext: bytes) -> str:
|
||||
content = decrypted_data[16:] # 去除头部的16字节
|
||||
return content.decode('utf-8').strip()
|
||||
|
||||
def getRawDelivery():
|
||||
encrypted = auth_lite_encrypt('title_id=SDGB&title_ver=1.40&client_id=A63E01C2805')
|
||||
def getRawDelivery(title_ver:str="1.41"):
|
||||
encrypted = auth_lite_encrypt(f'title_id=SDGB&title_ver={title_ver}&client_id=A63E01C2805')
|
||||
r = httpx.post(
|
||||
'http://at.sys-allnet.cn/net/delivery/instruction',
|
||||
data = encrypted,
|
||||
@@ -89,8 +89,8 @@ def parseUpdateIni(iniText):
|
||||
|
||||
# 根据前缀选择消息模板和图标
|
||||
prefix_icons = {
|
||||
'PATCH': ('💾 游戏程序更新 ', 'PATCH_'),
|
||||
'OPTION': ('📚 游戏内容更新 ', 'OPTION_')
|
||||
'PATCH': ('💾 游戏程序更新 (.app) ', 'PATCH_'),
|
||||
'OPTION': ('📚 游戏内容更新 (.opt) ', 'OPTION_')
|
||||
}
|
||||
icon, prefix = prefix_icons.get(game_desc.split('_')[0], ('📦 游戏更新 ', ''))
|
||||
|
||||
@@ -98,20 +98,20 @@ def parseUpdateIni(iniText):
|
||||
game_title = game_desc.replace(prefix, '', 1)
|
||||
message.append(f"{icon}{game_title}")
|
||||
|
||||
# 添加可选文件的下载链接(如果有)
|
||||
if 'OPTIONAL' in config:
|
||||
message.append("往期更新包:")
|
||||
optional_files = [f"{url.split('/')[-1]} {url}" for _, url in config.items('OPTIONAL')]
|
||||
message.extend(optional_files)
|
||||
|
||||
# 添加主文件的下载链接
|
||||
main_file = common['INSTALL1']
|
||||
main_file_name = main_file.split('/')[-1]
|
||||
message.append(f"下载: \n- [{main_file_name}]({main_file})")
|
||||
|
||||
# 添加可选文件的下载链接(如果有)
|
||||
if 'OPTIONAL' in config:
|
||||
message.append("其它文件:")
|
||||
optional_files = [f"- [{url.split('/')[-1]}]({url})" for _, url in config.items('OPTIONAL')]
|
||||
message.extend(optional_files)
|
||||
|
||||
message.append(f"此次更新包: \n{main_file_name} {main_file}")
|
||||
|
||||
# 添加发布时间信息
|
||||
release_time = common['RELEASE_TIME'].replace('T', ' ')
|
||||
message.append(f"将于 {release_time} 发布。\n")
|
||||
message.append(f"正式发布时间:{release_time}。\n")
|
||||
|
||||
# 构建最终的消息字符串
|
||||
final_message = '\n'.join(message)
|
||||
|
||||
Reference in New Issue
Block a user