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

Error: Received in valid request - Late crash inside GoBooDo.getInitialData() from GoBooDo.resethead() #70

Open
LBRDan opened this issue May 14, 2022 · 0 comments

Comments

@LBRDan
Copy link

LBRDan commented May 14, 2022

In my specific error case, the cause was something related to the class GoBooDo constructor called method resethead trying to set the future used request headers Cookie after making a request to "google."+self.domain
Frequently the response cookie does not contain the expected value with key NID, leading to a late crash inside getInitialData (where self.head it's used, but it's not defined)

As reported here, this NID is used by Google to recognize you in the next visits
However, as in the response object inside the resethead method this is not provided, it may be removed as part of a server side automatic cookie response, maybe related to the strict privacy policy
It may be skipped entirely, but if it's implemented, there might be a reason i guess...

Manually visiting Google inspecting this problem using an incognito chrome window, I found out that accepting the cookie consent popup, the cookie get populated with NID accordingly
Maybe it's time to harvest these information via an headless driver such as selenium (maybe triggering the consent for the cookie policy popup), and then keep using BeautifulSoup for the resulting response scraping if needed

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

1 participant