diff --git a/genshin/client/components/geetest/client.py b/genshin/client/components/geetest/client.py index dbc9245c..0b1d8373 100644 --- a/genshin/client/components/geetest/client.py +++ b/genshin/client/components/geetest/client.py @@ -9,8 +9,6 @@ import aiohttp import aiohttp.web -import qrcode -import qrcode.image.pil from qrcode.constants import ERROR_CORRECT_L from genshin import constants, errors @@ -527,6 +525,9 @@ async def login_with_qrcode(self) -> typing.Dict[str, str]: Returns cookies. """ + import qrcode + import qrcode.image.pil + 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()