diff --git a/genshin/client/components/geetest/client.py b/genshin/client/components/geetest/client.py index c594ecc1..dbc9245c 100644 --- a/genshin/client/components/geetest/client.py +++ b/genshin/client/components/geetest/client.py @@ -9,6 +9,9 @@ import aiohttp import aiohttp.web +import qrcode +import qrcode.image.pil +from qrcode.constants import ERROR_CORRECT_L from genshin import constants, errors from genshin.client import routes @@ -524,10 +527,6 @@ async def login_with_qrcode(self) -> typing.Dict[str, str]: Returns cookies. """ - import qrcode - import qrcode.image.pil - from qrcode.constants import ERROR_CORRECT_L - creation_result = await self._create_qrcode() qrcode_: qrcode.image.pil.PilImage = qrcode.make(creation_result.url, error_correction=ERROR_CORRECT_L) # type: ignore qrcode_.show()