-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__Secure-1PSIDTS #6
Comments
As mentioned in readme, the best workaround is to use a separate google account.
|
If there's no "__Secure-1PSIDTS" in your account's cookie list, simply leaving it empty should work. (I believe so, if not just let me know :) |
no, leaving the field blank just gives me : File "/usr/local/lib/python3.10/dist-packages/gemini/client.py", line 124, in init ERROR: Application startup failed. Exiting. |
This comment was marked as outdated.
This comment was marked as outdated.
This is a translation, so please excuse my poor English. I was also bothered by the early deadline. However, if you close Gemini's screen immediately after retrieving the cookie, the cookie can be used for a long time. As a procedure After getting the values of “__Secure-1PSID” and “__Secure-1PSIDTS” |
You are right. Combined with another separate account it can last even longer (in my own case around 1 month)
I believe this behavior can be different by account. My account has __Secure-1PSIDTS immediately after logging out and re-login. Btw re-login will force refresh your previous __Secure-1PSID and __Secure-1PSIDTS. |
@raymerjacque Can you update to the latest version can try again with the account without __Secure-1PSIDTS? |
what I did was go into an incognito tab, login to gemini from there and use those cookies |
- feat: add support to auto refresh cookies in background - feat: add support to import cookies from local browser - feat: add support to control log level - feat: now client will automatically retry when generate_content raises APIError - fix: now the timeout value will be correctly applied after re-initializing the client - docs: update readme and function docstrings - refactor: split utils.py into multiple files - build: update supported python version close #6
Hey, I had the same issue before. My solution is that (macOS + Chrome):
import asyncio
from gemini_webapi import GeminiClient
# Replace "COOKIE VALUE HERE" with your actual cookie values.
# Leave Secure_1PSIDTS empty if it's not available for your account.
# chop off the "__Secure_1PSID=" and ";" at the end
Secure_1PSID = 'g.a0_something_something_076'
# chop off the "__Secure_1PSIDTS=" and ";" at the end
Secure_1PSIDTS = 'sidts-somgthing_somgthing_EAA'
async def main():
# If browser-cookie3 is installed, simply use `client = GeminiClient()`
client = GeminiClient(Secure_1PSID, Secure_1PSIDTS, proxies=None)
await client.init(timeout=30, auto_close=False, close_delay=300, auto_refresh=False) # I turned auto-refresh off
asyncio.run(main())
|
I see the issue now about 1PSIDTS it's not about that cookie it's because the 1PSID it self when u run the console the issue is 1PSIDTS but its not the real issue is 1PSID and now i already change 1PSID cookie it works perfectly fine dont change the 1PSIDTS just change the 1PSID cookie trust me 🥰 |
the __Secure-1PSIDTS expires very quickly... is there no way around this ? a script to renew it, or another method of authentication ? another cookie or token that can be used ?
some google account dont even show "__Secure-1PSIDTS" its not available in F12 or cookie editor, what to do in such cases ?
The text was updated successfully, but these errors were encountered: