diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-02-09 18:51:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-09 18:51:27 +0100 |
commit | 6c7c293fd16b970d857c888b5108334f00b27a19 (patch) | |
tree | 3deecb18f982e133cb3b0337ffb0bdcbb607a212 /g4f/Provider/needs_auth/Gemini.py | |
parent | Update OpenaiChat.py (diff) | |
parent | Update Gemini.py (diff) | |
download | gpt4free-6c7c293fd16b970d857c888b5108334f00b27a19.tar gpt4free-6c7c293fd16b970d857c888b5108334f00b27a19.tar.gz gpt4free-6c7c293fd16b970d857c888b5108334f00b27a19.tar.bz2 gpt4free-6c7c293fd16b970d857c888b5108334f00b27a19.tar.lz gpt4free-6c7c293fd16b970d857c888b5108334f00b27a19.tar.xz gpt4free-6c7c293fd16b970d857c888b5108334f00b27a19.tar.zst gpt4free-6c7c293fd16b970d857c888b5108334f00b27a19.zip |
Diffstat (limited to 'g4f/Provider/needs_auth/Gemini.py')
-rw-r--r-- | g4f/Provider/needs_auth/Gemini.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/Provider/needs_auth/Gemini.py b/g4f/Provider/needs_auth/Gemini.py index 402fc02f..32510505 100644 --- a/g4f/Provider/needs_auth/Gemini.py +++ b/g4f/Provider/needs_auth/Gemini.py @@ -66,6 +66,8 @@ class Gemini(AsyncGeneratorProvider): prompt = format_prompt(messages) if not cookies: + cookies = get_cookies(".google.com", False, True) + if "__Secure-1PSID" not in cookies or "__Secure-1PSIDCC" not in cookies: driver = None try: driver = get_browser(proxy=proxy) @@ -88,8 +90,6 @@ class Gemini(AsyncGeneratorProvider): if driver: driver.close() - if not cookies: - cookies = get_cookies(".google.com", False) if "__Secure-1PSID" not in cookies: raise MissingAuthError('Missing "__Secure-1PSID" cookie') |