GoBooDo icon indicating copy to clipboard operation
GoBooDo copied to clipboard

Problems with connecting

Open oldiegoldie123 opened this issue 3 years ago • 3 comments

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

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

Can anyone help?

oldiegoldie123 avatar Sep 01 '21 18:09 oldiegoldie123

Same here

AlinAlexandru28 avatar Sep 30 '21 22:09 AlinAlexandru28

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']),

minamotorin avatar Nov 23 '21 06:11 minamotorin

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

mrelg avatar Feb 19 '22 08:02 mrelg