Module genshin.client.manager.cookie

Cookie completion.

Available conversions:

  • fetch_cookie_with_cookie
    • cookie_token -> cookie_token
    • cookie_token -> ltoken
    • stoken -> cookie_token
    • stoken -> ltoken
    • stoken -> login_ticket
  • fetch_cookie_token_info
    • cookie_token -> cookie_token
    • login_ticket -> cookie_token
  • fetch_cookie_with_stoken_v2
    • stoken (v2) + mid -> ltoken_v2 (token_type=2)
    • stoken (v2) + mid -> cookie_token_v2 (token_type=4)
  • cn_fetch_cookie_token_with_stoken_v2
    • stoken (v2) + mid -> cookie_token
  • fetch_cookie_token_with_game_token
    • game_token -> cookie_token
  • fetch_stoken_with_game_token
    • game_token -> stoken

Functions

Fetch cookie_token with an stoken (v2) and mid.

async def complete_cookies(cookies: managers.CookieOrHeader, *, refresh: bool = True, region: types.Region = Region.OVERSEAS)

Add ltoken and ltuid to a cookie with only a cookie_token and an account_id.

If refresh is True, the cookie token will be refreshed to last longer.

Fetch cookie token info.

Fetch cookie token with game token, which can be obtained by scanning a QR code.

Fetch cookie token info with an stoken.

Fetch cookie (v2) with an stoken (v2) and mid.

async def fetch_stoken_with_game_token(*, game_token: str, account_id: int) ‑> StokenResult

Fetch cookie token with game token, which can be obtained by scanning a QR code.

Refresh a cookie token to make it last longer.