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

Problems with connecting #57

Open
oldiegoldie123 opened this issue Sep 1, 2021 · 3 comments
Open

Problems with connecting #57

oldiegoldie123 opened this issue Sep 1, 2021 · 3 comments

Comments

@oldiegoldie123
Copy link

When trying to fetch a book, I am persistently getting this error:

"name='NID', domain=None, path=None"
Received invalid response

Can anyone help?

@AlinAlexandru28
Copy link

Same here

@minamotorin
Copy link

Maybe the cause is that the cookie from https://google.{country} does not have key NID.
However, I have no idea why. GoBooDo works in my environment.
Please try other countries.

I wrote short test program. In my environment, this work (KeyError does not occurs).
NOTE: This program should be run in the same directory as settings.json.

#!/usr/bin/env python3
# This program is in the public domain and no warranty.
import json
import requests

with open('settings.json') as ofile:
  country = json.load(ofile)['country']

print(country)

req = requests.get("https://google."+country,verify=False)
print(req.cookies['NID'])

Commenting out line 58 of GoBooDo.py might be workaround, but it's not safe.

-                'Cookie': "NID=" + str(req.cookies['NID']),
+                #'Cookie': "NID=" + str(req.cookies['NID']),

@mrelg
Copy link

mrelg commented Feb 19, 2022

#63 in reset_head(self)
req = requests.get("https://google."+self.country, cookies={'CONSENT': 'YES+1'}, verify=False)

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

4 participants