diff --git a/plugins/genshin/pay_log.py b/plugins/genshin/pay_log.py index 52b3f97f..21ba2566 100644 --- a/plugins/genshin/pay_log.py +++ b/plugins/genshin/pay_log.py @@ -86,7 +86,7 @@ class PayLogPlugin(Plugin.Conversation): lang="zh-cn", 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: await message.reply_text( "开始导入充值历史记录:请通过 https://paimon.moe/wish/import 获取抽卡记录链接后发送给我" diff --git a/utils/genshin.py b/utils/genshin.py index c897261e..203c880e 100644 --- a/utils/genshin.py +++ b/utils/genshin.py @@ -27,11 +27,11 @@ def recognize_genshin_game_biz(game_uid: int) -> str: 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""" headers = GACHA_HEADERS.copy() json = { - "auth_appid": "webview_gacha", + "auth_appid": auth_appid, "game_biz": recognize_genshin_game_biz(client.uid), "game_uid": client.uid, "region": recognize_genshin_server(client.uid),