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:
parent
d71df50776
commit
2a9f147bf9
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue