🐛 Fix pay_log gen error authkey

This commit is contained in:
xtaodada 2023-07-17 15:55:35 +08:00
parent 112dc65127
commit 23f08f5639
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ class PayLogPlugin(Plugin.Conversation):
lang="zh-cn", lang="zh-cn",
uid=player_info.player_id, uid=player_info.player_id,
) )
authkey = await get_authkey_by_stoken(client) authkey = await get_authkey_by_stoken(client, auth_appid="csc")
if not authkey: if not authkey:
await message.reply_text( await message.reply_text(
"<b>开始导入充值历史记录:请通过 https://paimon.moe/wish/import 获取抽卡记录链接后发送给我" "<b>开始导入充值历史记录:请通过 https://paimon.moe/wish/import 获取抽卡记录链接后发送给我"

View File

@ -27,11 +27,11 @@ def recognize_genshin_game_biz(game_uid: int) -> str:
return "hk4e_cn" if game_uid < 600000000 else "hk4e_global" return "hk4e_cn" if game_uid < 600000000 else "hk4e_global"
async def get_authkey_by_stoken(client: Client) -> Optional[str]: async def get_authkey_by_stoken(client: Client, auth_appid: str = "webview_gacha") -> Optional[str]:
"""通过 stoken 获取 authkey""" """通过 stoken 获取 authkey"""
headers = GACHA_HEADERS.copy() headers = GACHA_HEADERS.copy()
json = { json = {
"auth_appid": "webview_gacha", "auth_appid": auth_appid,
"game_biz": recognize_genshin_game_biz(client.uid), "game_biz": recognize_genshin_game_biz(client.uid),
"game_uid": client.uid, "game_uid": client.uid,
"region": recognize_genshin_server(client.uid), "region": recognize_genshin_server(client.uid),