Add new option to change no content found error into HTTP 403 error#2799
Merged
dteviot merged 2 commits intoJul 13, 2026
Merged
Conversation
Owner
|
It's an advanced option. I'll accept it. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the option to turn
no content found errorinto anHTTP 403 error.It is useful as a workaround when
isCustomErrorandsetCustomErrorResponseare not implemented in a parser.When a site gives the wrong error code when giving the user a challenge page (captcha, Cloudflare, rate limit, etc...).
It allows the user to clear the challenge page and resume downloading from where they were, instead of losing all progress or ending up with multiple fragmented EPUBs when downloading a single book.
Tested and working on alicesw.com, with and without
isCustomErrorandsetCustomErrorResponseimplemented in the AliceswParser.Only issue is the fact that this implementation doesn't work if a custom parser already include
fetchChapterwithout passing a reference to theparserin thewrapOptions.If it fails in this way and the
NoContentToError403 optionis selected, it will now throw anHTTP 403 errorinstead of ano content found error, before aborting the download.Tested and failing (has expected) on alicesw.com, without passing a reference to the
parserinwrapOptionswhenfetchChapterimplemented in the AliceswParser.Tested and working on alicesw.com, while passing a reference to the
parserinwrapOptionswhenfetchChapterimplemented in the AliceswParser.#2785