Add Konkon/Kuupress support - #2941
Open
MineRobber9000 wants to merge 7 commits into
Open
Conversation
...not entirely sure how I missed HttpClient.setDeclarativeNetRequestRules...
dteviot
reviewed
Aug 21, 2026
| let data = await this.fetchCache.fetch(url); | ||
| // Store novel URL and title on parser (used in addFirstPageUrlToWebPages below) | ||
| this.novelUrl = this.siteUrl + "/read/" + data.data?.slug; | ||
| this.novelTitle = data.data?.title; |
Owner
There was a problem hiding this comment.
Is this actually going to work if data.data is null? That will result in an undefined novelTitle.
Author
There was a problem hiding this comment.
I generally assume data.data exists, though I should definitely add a check for it after fetching the data. If the title or slug get moved, they will indeed be undefined. Should this raise an error instead?
dteviot
reviewed
Aug 21, 2026
dteviot
reviewed
Aug 21, 2026
dteviot
reviewed
Aug 21, 2026
dteviot
reviewed
Aug 21, 2026
dteviot
requested changes
Aug 21, 2026
dteviot
left a comment
Owner
There was a problem hiding this comment.
Thank you for your hard work.
Fix the innerHTML issue and I'll happily accept.
Also makes sure that the error messages are always somewhat informative as to what exactly is missing.
For chapter fetching and the novel description on the ToC page, I ended up using `util.parseHtmlAndInsertIntoContent`, since it does pretty much exactly what I want. As for extracting the description for the metainfo, I ended up going with just plain `util.sanitize` and returning the textContent.
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.
Konkon and Kuupress are novel sharing sites from the team originally behind ZetroTranslation (shutting down at the end of this month). They share a similar backend, so I figured I'd PR in support for both of them at the same time.
Unfortunately, due to how their API authenticates requests, we can't actually get chapters that aren't completely unlocked to the public (basically, noSo apparently I completely missedOriginheader, no user authentication, even if we have the user'skonkon-/kuupress-sessioncookie). Still, being able to download all free chapters of a novel is better than nothing.HttpClient.setDeclarativeNetRequestRuleswhen I was looking at other parsers... that one's on me, lol. I can now confirm it works (at least, I was able to download a chapter I bought on Konkon; like I said, the two sites are extremely similar on the backend, so I believe it should also work on Kuupress).One thing to note: currently, all Konkon/Kuupress novels trigger the WEBP "your ePub reader may not be able to render this" warning. This is because all covers are stored as WEBP on the backend (except the default covers, which are stored as JPG).