From aa9ddfc2675a2b8874344bdafdf4513b01d9af23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Thu, 20 Jul 2023 12:08:07 +0800 Subject: [PATCH] :art: Use `simnet.Cookies` to parse cookies --- plugins/tools/challenge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/tools/challenge.py b/plugins/tools/challenge.py index 49a6b0a0..20dc38e0 100644 --- a/plugins/tools/challenge.py +++ b/plugins/tools/challenge.py @@ -1,6 +1,7 @@ from typing import Tuple, Optional from simnet import Region +from simnet.client.cookies import Cookies from simnet.errors import BadRequest as SIMNetBadRequest from core.basemodel import RegionEnum @@ -102,7 +103,7 @@ class ChallengeSystem(Plugin): _, challenge = await self.get_challenge(player.player_id) if challenge is None: raise ChallengeSystemException("验证失效 请求已经过期") - verify = Verify(cookies=cookie_model.data) + verify = Verify(cookies=Cookies(cookie_model.data)) try: await verify.verify(challenge=challenge, validate=validate) except ResponseException as exc: