Giter Club home page Giter Club logo

Comments (5)

MeemeeLab avatar MeemeeLab commented on July 18, 2024 1

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.

dsdanielpark avatar dsdanielpark commented on July 18, 2024

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.

MeemeeLab avatar MeemeeLab commented on July 18, 2024

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.

rudrajyotibhattacharya avatar rudrajyotibhattacharya commented on July 18, 2024

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.

rudrajyotibhattacharya avatar rudrajyotibhattacharya commented on July 18, 2024

Thanks @MeemeeLab
Closing the issue as it is not appearing anymore.

from bard-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.