anyflip-downloader
anyflip-downloader copied to clipboard
2023/11/09 15:06:13 received non-200 response:403 Forbidden
Describe the bug I get this error message: 2023/11/09 15:06:13 received non-200 response:403 Forbidden
OS: [e.g. MACOS Intel]
To Reproduce anyflip-downloader http://*****.stude*nti33.**it/secure/docs/ISBN/
Expected behavior to download the book
Additional context When using my browser, i should sign in first. Is there a way to use browser cookies, or add an extra login step?
Hey, I notice that the URL you provided does not seem to be an anyflip URL. Can you check whether the site is actually part of the anyflip.com website?
A 403 gets thrown when the target server actively rejects the connection, so this should be working as intended from anyflip-downloader's point of view.
By way of example, the below anyflip URL doesn't currently load properly if you try to navigate to it in a browser, so the downloader correctly prints the 403 it received from the server.
PS ~> anyflip-downloader https://anyflip.com/cmjgl/kqpc/
Preparing to download
2023/11/12 09:36:35 received non-200 response:403 Forbidden
It might be worth adding some brief logic to exit when the user passes an invalid URL as an arg (as in the OP), but otherwise all you can really do for this one is intercept the 403 and instead print a message with a bit more detail, e.g., have it say something like the anyflip URL isn't resolving and the user should try to navigate to the URL manually.
getting the same error:
anyflip-downloader http://www.flipsnack.com/USATF/2021-form-990-and-related-filings.html