Comments (5)
With recent update you can do something like this:
from bardapi import BardCookies
cookie_dict = {
"__Secure-1PSID": "...",
"__Secure-1PSIDTS": "...",
}
bard = BardCookies(cookie_dict=cookie_dict)
print(bard.get_answer("Hello"))
This commit is not published to pip so you have to install via pip install git+https://github.com/dsdanielpark/Bard-API.git
from bard-api.
Have you checked if the __Secure-1PSID value has changed? Although it is user-specific, it can also be tied to the IP address. There is also a possibility that the __Secure-1PSID value may change intermittently.
from bard-api.
I think you have problem that I have. it sometimes works with only __Secure-1PSID, sometimes needs __Secure-1PSIDTS, sometimes __Secure-1PSIDTS changes (like once in a day)
Confusing thing is that __Secure-1PSID does not change unless logging out and login again, but browser seems to be handling this __Secure-1PSIDTS cookie rotation because I don't have to log back in.
I'm not sure why that's happening, it might be rolled out to specific user or something.
from bard-api.
Hi Daniel,
I did not check if the cookie changed even when I was logged in. I straightaway logged out and logged in and tried with the new cookie value but the same problem happened. I have a suspicion which I am sharing just in case somebody else faces the same issue. I installed a metamask extension (a crypto wallet connect) in the chrome instance where the "problematic" user was logged in, after which this problem started. It might just be a coincidence but when I logged in from edge with the same "problematic" user and used the cookie, this particular problem went away. Although, the intermittent "Response error" is coming now, which other people have also reported.
Hi @MeemeeLab, do you mean you use '__Secure-1PSIDTS' cookie value while making Bard calls? Does that work?
from bard-api.
Thanks @MeemeeLab
Closing the issue as it is not appearing anymore.
from bard-api.
Related Issues (20)
- ChatBard: token_from_browser HOT 9
- ImportError: cannot import name 'BardCookies' from partially initialized module 'bardapi' (most likely due to a circular import) HOT 6
- Some code errors in README examples , os module import HOT 4
- Bard __SECURE-1PSID does not match HOT 2
- Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as Bard(token='xxxxx') HOT 1
- Google changed the the way "__Secure-1PSID" looks, how to use this package effectively,the cookie values does not end in '.' period now HOT 8
- Multiple-Cookies has been changed. HOT 15
- Image generation HOT 4
- Google renames its chatbot Bard to Gemini HOT 40
- Gemini Ultra? HOT 4
- TooManyRedirects: Exceeded 30 redirects. HOT 1
- Check out this Bard/Gemini project. HOT 2
- Google changed their __Secure-1PSID value stracture HOT 2
- ask_about_image Not working HOT 2
- Cookies refreshing very often and getting 429 all the time HOT 2
- How can automaticly get cookies value in no gui servers? HOT 2
- Please, go to Gemini-API `https://github.com/dsdanielpark/Gemini-API`
- a conversation towards getting advance AI HOT 1
- Reflection on the Bard API Project
- Connecting Geminei to Ads HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bard-api.