mirror of
https://github.com/HanaokaYuzu/Gemini-API.git
synced 2026-04-12 12:23:03 -06:00
Is there an issue with the code that automatically loads cookies? #53
Labels
No labels
advanced
advanced
bug
dependencies
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
model
pull-request
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mirrors/Gemini-API#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 = cookiesMy automatic cookie loading can only be achieved after adding this piece of code.
@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.
@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.