From 401e55f4bc5e524868e15c3e61cfb2c083445e80 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 14 Jan 2023 22:45:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20get=20public=20cookies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/cookies/services.py | 2 +- plugins/genshin/uid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cookies/services.py b/core/cookies/services.py index 8d10404..4769f18 100644 --- a/core/cookies/services.py +++ b/core/cookies/services.py @@ -82,7 +82,7 @@ class PublicCookiesService: else: raise CookieServiceError try: - record_card = await client.get_record_card() + record_card = (await client.get_record_cards())[0] if record_card.game == Game.GENSHIN and region == RegionEnum.HYPERION: await client.get_partial_genshin_user(record_card.uid) except InvalidCookies as exc: diff --git a/plugins/genshin/uid.py b/plugins/genshin/uid.py index 3874254..a7863f2 100644 --- a/plugins/genshin/uid.py +++ b/plugins/genshin/uid.py @@ -125,7 +125,7 @@ class SetUserUid(Plugin.Conversation, BasePlugin.Conversation): else: return ConversationHandler.END try: - user_info = await client.get_record_card(hoyolab_uid) + user_info = (await client.get_record_cards(hoyolab_uid))[0] except DataNotPublic: await message.reply_text("角色未公开", reply_markup=ReplyKeyboardRemove()) logger.warning(f"获取账号信息发生错误 hoyolab_uid[{hoyolab_uid}] 账户信息未公开")