Feat/kakuyomu - #236
Merged
Merged
Conversation
Browse/search/details scrape the Apollo Client cache Next.js serializes
into __NEXT_DATA__ on every server-rendered page, walking its normalized
{__ref: "Type:id"} entity graph rather than HTML selectors. Cover images
use the predictable cdn-static.kakuyomu.jp og-image path since most works
have no dedicated cover.
The episode read page itself returns 404 for a plain HTTP request
regardless of cookies/UA - it only renders for a real browser session
that fetches the body client-side - so chapter text falls back to
runWebView. That WebView path (including the .widget-episodeBody
selector, Kakuyomu's long-standing public reader markup) could not be
verified live in this environment and needs on-device confirmation.
kakuyomu.jp's robots.txt disallows crawling episode read pages
(/works/*/episodes/*/read) for all user-agents, not just AI crawlers;
built per explicit instruction to proceed anyway.
…episode refs parseChapterList numbered chapters by the pre-filter flatMap index, so any episode ref that failed to resolve (deleted/unavailable episode still listed in the TOC) left a gap in chapter_number and mislabeled every later chapter's index-based fallback title. Number sequentially over resolved episodes only. Also moves the extension from src/ja to src/jp (package extension.ja -> novelextension.jp) to match this repo's existing convention for Japanese sources (syosetu family) - the lang field itself stays "ja".
Search used ?offset= which the server ignores; it always returns the first page regardless of offset. Real pagination param is ?page=. fetchPageText requested /read which 404s unconditionally and only hit the WebView fallback, timing out every time. The episode body renders server-side under .widget-episodeBody at the URL without the /read suffix, so fetch it directly instead of going through WebView.
…ield, strip comments
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.
Checklist:
versionCodevalue inbuild.gradle.ktsbaseVersionCodeinbuild.gradle.kts(if updated multisrc theme code)contentWarningconfiguration inbuild.gradle.ktsappropriatelyidif a source's name or language were changedweb_hi_res_512.pngwhen adding a new extension