| def __init__( self , session_id):
headers = {
Host : bard.google.com ,
X-Same-Domain : 1 ,
User-Agent : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 ,
Content-Type : application/x-www-form-urlencoded;charset=UTF-8 ,
Origin : https://bard.google.com ,
Referer : https://bard.google.com/ ,
}
self ._reqid = int (.join(random.choices(string.digits, k = 4 )))
self .conversation_id =
self .response_id =
self .choice_id =
self .session = requests.Session()
self .session.headers = headers
self .session.cookies. set ( __Secure-1PSID , session_id)
self .SNlM0e = self .__get_snlm0e() |