用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"))