Skip to content

Feat/kakuyomu - #236

Merged
Rojikku merged 5 commits into
NovelSourcery:mainfrom
mrissaoussama:feat/kakuyomu
Sep 1, 2026
Merged

Feat/kakuyomu#236
Rojikku merged 5 commits into
NovelSourcery:mainfrom
mrissaoussama:feat/kakuyomu

Conversation

@mrissaoussama

Copy link
Copy Markdown
Contributor

Checklist:

  • Updated versionCode value in build.gradle.kts
  • Updated baseVersionCode in build.gradle.kts (if updated multisrc theme code)
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Set the contentWarning configuration in build.gradle.kts appropriately
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension
  • This PR is AI-assisted, I have reviewed the changes manually and confirmed they are not slop

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.
@Rojikku
Rojikku merged commit d2e4ebd into NovelSourcery:main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants