Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to get response #13

Open
izdrail opened this issue Jul 19, 2023 · 4 comments
Open

Failing to get response #13

izdrail opened this issue Jul 19, 2023 · 4 comments

Comments

@izdrail
Copy link

izdrail commented Jul 19, 2023

When running it seems form me it's failing at this functionality.
def __get_snlm0e(self): resp = self.session.get(url="https://bard.google.com/", timeout=10) # Find "SNlM0e":"<ID>" if resp.status_code != 200: raise Exception("Could not get Google Bard") print(resp.text) exit(0) SNlM0e = re.search(r"SNlM0e\":\"(.*?)\"", resp.text).group(1) return SNlM0e
For some reason he cannot finds the SNlM0e in the response text

@shiyishiaa
Copy link

https://github.com/acheong08/Bard
Try this.

@Amm1rr
Copy link

Amm1rr commented Aug 12, 2023

To retrieve the SNlM0e value from Bard, you must include an additional cookie in the request. Specifically, you need to send the key-value pair for __Secure-1PSIDTS in the request. You can place this key-value pair just below the entry for __Secure-1PSID.

WebAI to API

Bard Cookie

@Amm1rr Amm1rr mentioned this issue Aug 31, 2023
@izdrail
Copy link
Author

izdrail commented Sep 6, 2023

Thanks for sharing that .
Did you managed to make it an container ?
I've done an implementation here
https://github.com/Amm1rr/WebAI-to-API/pull/18/files/207911c1af3c49f686bd45b6988980a76e469af4

@Amm1rr
Copy link

Amm1rr commented Sep 9, 2023

Yeah sure, thanks for the pull request. I will review it and provide feedback this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants