evmer / perlego-downloader

Download books from Perlego.com in PDF format
MIT License
106 stars 52 forks source link

The read operation timed out #29

Closed Moanrisy closed 1 year ago

Moanrisy commented 1 year ago

My internet is fine, what is this read operation time out mean?

evmer commented 1 year ago

Duplicate of #11

Moanrisy commented 1 year ago

@evmer I just re read the error again, and it was different error. on issue #11 it say connection timed out.

but mine was "read operation timed out"

evmer commented 1 year ago

Can you please post here the full output?

Moanrisy commented 1 year ago

image

The printed error was on line 62

evmer commented 1 year ago

Thank you. Can you share the BOOK_ID?

Moanrisy commented 1 year ago

this is the book that I want BOOK_ID = "2802894"

I try to use the book id from your video (youtube), it result the same error BOOK_ID = "2173908"

evmer commented 1 year ago

Can you add print(data) after line 61 so we can debug? Then try to re-run the script and post here the output.

image
Moanrisy commented 1 year ago

image

The error say it was Unauthorized, but I copy the Bearer token from firefox network tab. I try use chrome too to get the auth token, but it result the same.

Btw thank you for your fast reply, I never touch python so idk how debug it. but print keyword really give me the root of the problem, although im not sure why my auth token didnt work

Moanrisy commented 1 year ago

After I remove the Bearer, it working :)

Whenever I consume API, I always need to include Bearer keyword. This is the first time that I should omit the Bearer keyword.

thank you once again

Faisalnd commented 1 year ago

Can you add print(data) after line 61 so we can debug? Then try to re-run the script and post here the output.

image

I've add it and I still got this error: % python3 downloader.py {'event': 'error', 'data': {'message': 'Failed to validate recaptcha token', 'code': 6}} download error: Connection timed out

I only copid the AUTH_TOKEN without "Bearer"

Screenshot 2022-11-22 at 7 24 51 PM Screenshot 2022-11-22 at 7 25 37 PM

I've used Firefox to get another auth and same issue "Failed to validate recaptcha token"

thanks

caseypaite commented 1 year ago

Can you add print(data) after line 61 so we can debug? Then try to re-run the script and post here the output.

image

I've add it and I still got this error: % python3 downloader.py {'event': 'error', 'data': {'message': 'Failed to validate recaptcha token', 'code': 6}} download error: Connection timed out

I only copid the AUTH_TOKEN without "Bearer"

Screenshot 2022-11-22 at 7 24 51 PM Screenshot 2022-11-22 at 7 25 37 PM

I've used Firefox to get another auth and same issue "Failed to validate recaptcha token"

thanks

Same issue here. The "reCaptchaToken": AUTH_TOKEN in line 32 might need to be changed to use appropriate value. I have checked the JSON equivalent string of that line on https://websocketking.com/ and same error response shows up.

caseypaite commented 1 year ago

Works without issue with the latest commit. Thanks.