Avoid retrieving truncated book chapters/pages/sections

When modifying the 'sessionid' after each call to oreilly api,
there are calls that are considered not-authenticated and we retrieved
truncated chapters/pages.
By avoiding adding/modifying it, all the calls are correctly authenticated
and we manage to retrieve full chapters/pages.
This commit is contained in:
Gregory LEOCADIE 2019-08-27 09:47:19 +02:00
commit 2a9f147bf9

View file

@ -386,9 +386,10 @@ class SafariBooks:
def update_cookies(self, jar):
for cookie in jar:
self.cookies.update({
cookie.name: cookie.value
})
if cookie.name != 'sessionid':
self.cookies.update({
cookie.name: cookie.value
})
def requests_provider(
self, url, post=False, data=None, perfom_redirect=True, update_cookies=True, update_referer=True, **kwargs