-
Notifications
You must be signed in to change notification settings - Fork 692
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
Handle orm-rt cookie issue #152
Conversation
Hey @elrob , I am getting an "Unexpected error" after pulling your repo. The script is unable to perform auth login. |
I'm not having any issue with logging in. I've just tested again myself. How far does the script get for you? |
- orm-rt cookie has floating point max-age - requests library fails to include it in response.cookies
I was using the wrong password ... But I'm still getting cropped books. |
I tried your code with a book 9781491983638 but the issue #150 still happened |
@McPatate @phamhoangtuan |
@lorenzodifuccia Yes, thank you. This PR is up-to-date with all the fixes mentioned in the PR description above (I just updated the description again). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Rob, I pushed an update with your changes. Thanks you for what you did, nice job man!
Few point that i changed:
HEADERS
are needed because of the user-agent and because of the accept-enconding, there was an issue related to Brotli compression algorithm (Problem with CSS file #21).- Renamed
update_cookie_jar_with_float_max_age_cookies
tohandle_cookie_update
to be more general and let this function be used also for future handling. - Personally, I think you do not really need to process the cookie through SimpleCookie, I think you can just search if there is a float num and set the cookie manually.
- I added a try/catch block for the
next_parameter
parsing - I really like them, but I personally discard the use of the F-strings because of compatibility. String interpolation needs Py3.6+.
- I fixed and changed some other things...
Thank you!
Cheers 🍻
Fixes: