用BardCookies可以解决问题

from bardapi import BardCookies

cookie_dict = {
    "__Secure-1PSID": "xxxxxxxxx",
    "__Secure-1PSIDTS": "xxxxxxxxx",
    "__Secure-1PSIDCC", "xxxxxxx")
}

bard = BardCookies(cookie_dict=cookie_dict)

print(bard.get_answer("hello"))

© 本文著作权归作者所有。转载请联系授权,禁止商用。