Is there an issue with the code that automatically loads cookies? #53

Closed
opened 2026-02-13 17:27:44 -06:00 by mirrors · 2 comments
Owner

Originally created by @JidaDiao on GitHub (Apr 27, 2025).

github.com/HanaokaYuzu/Gemini-API@838009c543/src/gemini_webapi/client.py (L144-L147)
Should the following code be added after this if condition is evaluated?
self.cookies = cookies
My automatic cookie loading can only be achieved after adding this piece of code.

Originally created by @JidaDiao on GitHub (Apr 27, 2025). https://github.com/HanaokaYuzu/Gemini-API/blob/838009c5437f9a331cf646fa5cef5c77213935a1/src/gemini_webapi/client.py#L144-L147 Should the following code be added after this if condition is evaluated? `self.cookies = cookies` My automatic cookie loading can only be achieved after adding this piece of code.
mirrors 2026-02-13 17:27:44 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@HanaokaYuzu commented on GitHub (Apr 28, 2025):

No matter set it here or not, browser cookies will be be loaded again and used to get access token in:

github.com/HanaokaYuzu/Gemini-API@838009c543/src/gemini_webapi/utils/get_access_token.py (L104-L106)

Please enable debug logs and compare the difference when initializing client with and without your statement.

@HanaokaYuzu commented on GitHub (Apr 28, 2025): No matter set it here or not, browser cookies will be be loaded again and used to get access token in: https://github.com/HanaokaYuzu/Gemini-API/blob/838009c5437f9a331cf646fa5cef5c77213935a1/src/gemini_webapi/utils/get_access_token.py#L104-L106 Please enable debug logs and compare the difference when initializing client with and without your statement.
Author
Owner

@JidaDiao commented on GitHub (Apr 29, 2025):

My mistake, it's indeed not necessary to add this line of code to successfully initialize the client. Perhaps it was my VPN that was the issue, causing the initialization to fail? It doesn't matter anymore.

@JidaDiao commented on GitHub (Apr 29, 2025): My mistake, it's indeed not necessary to add this line of code to successfully initialize the client. Perhaps it was my VPN that was the issue, causing the initialization to fail? It doesn't matter anymore.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mirrors/Gemini-API#53
No description provided.