Skip to content

fix(english): rewrite LightNovelPlus plugin for the redesigned site - #2689

Closed
RibatTRW wants to merge 2 commits into
lnreader:masterfrom
RibatTRW:fm/lnreader-lightnovelplus-parse
Closed

RibatTRW wants to merge 2 commits into
lnreader:masterfrom
RibatTRW:fm/lnreader-lightnovelplus-parse

Conversation

@RibatTRW

@RibatTRW RibatTRW commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

AI-authored (Claude Code, supervised by the Firstmate agent orchestrator); not human-reviewed, and not tested in the LNReader app. No upstream issue.

LightNovelPlus[readnovelfull] failed its live check at parseNovel with Missing novel name. lightnovelplus.com has been rebuilt as a Nuxt app, so the readnovelfull template can no longer parse it:

  • novel pages are now en/detail/<id> (cover img has alt, no title);
  • the old get_chapter_list ajax endpoint is gone; chapters are paged at en/detail/<id>/page/<n> and also served as a JSON payload (.../_payload.json, 100 chapters per page);
  • listings are en/class?type=...&id=...&page_num=..., search is en/search?keyword=...; chapter text is in #chapter-content at en/book/<id>/<chapterId>.

Because the template cannot express this, the source is replaced by a standalone plugin rather than patching the shared generator (which is untouched). Plugin id and name are unchanged (lightnovelplus / LightNovelPlus), version 3.0.0. Novel paths saved from the old site (book/....html) will not resolve on the new site.

Changes

  • Added plugins/english/lightnovelplus.ts: popular/latest/completed + genre filter, search, novel details, full chapter list (via the JSON payload, with retries and a per-attempt timeout because the site returns 503 "Server is busy" under load), chapter text.
  • Removed the lightnovelplus entry from plugins/multisrc/readnovelfull/sources.json and deleted filters/lightnovelplus.json, so the generator stops emitting the broken file.
  • Moved the icon to public/static/src/en/lightnovelplus/icon.png (rename only).
  • If a chapter-list page still fails after retries, parseNovel throws rather than returning a silently truncated list.

Testing - read this

lightnovelplus.com went down while this was being tested (2026-10-15/16) and the live check could not be completed. No screenshots of the rewritten plugin could be captured (the requested playground screenshots are missing because nothing loads). The shipping decision was made knowing this.

Errors seen on the chapter pages (/en/detail/<id>/page/<n> and its _payload.json): HTTP 503 "Server is busy", requests hanging until timeout, and finally Cloudflare 522 on every page including the home page, listing, search and detail.

Verified live earlier, before the outage got worse (via npm run check:plugin -- plugins/english/lightnovelplus.ts and direct fetches):

  • popularNovels: PASS (20 novels)
  • searchNovels: PASS (1 result for "Divine Path System")
  • novel page 1 (name, cover, author, genres, status, summary) was fetched and the markup inspected; the HTML for a chapter page returned 200 with the chapter text in #chapter-content
  • npm run build:full exit 0; eslint and prettier clean on the changed files

Not verified live:

  • parseNovel end to end: chapter pagination was returning 503/hangs, then 522, so the chapter-list code (JSON payload parsing across pages) has not been run against a full novel. The checker reported parseNovel as INCONCLUSIVE / failed on a 503 for a later chapter page.
  • parseChapter through the checker (never reached), and any use inside the playground or the LNReader app.

Please re-run npm run check:plugin -- plugins/english/lightnovelplus.ts once the site is back before relying on this.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 2 warnings
  • ⚠️ lightnovelplus.com returned Cloudflare HTTP 522 (origin unreachable) on every attempt, so the rewritten plugin could not be exercised live and no playground screenshot of it working could be captured. The PR screenshot required by the intent is missing. Re-run when the site is reachable.
  • ⚠️ live validation verdict: inconclusive (0 of 2 scenarios were driven live against the product); untested: Open a novel via parseNovel and get its name (original 'Missing novel name' failure), Popular list, search and chapter content work in the plugin playground, with a headless screenshot for the PR
  • Live validation: ⚠️ inconclusive - 0 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Open a novel via parseNovel and get its name (original 'Missing novel name' failure) ⏸️ untested no Tried npm run check:plugin and curl on the home and detail URLs; Cloudflare returned 522 each time. The origin is down, so no workspace-local route can reach it. Re-run once the site is back.
Popular list, search and chapter content work in the plugin playground, with a headless screenshot for the PR ⏸️ untested no The same 522 outage means the playground has no data to show. I did not try launching the playground. A screenshot would have to wait until the site is reachable.
  • npm ci --ignore-scripts
  • npm run check:plugin -- plugins/english/lightnovelplus.ts (siteReachability: INCONCLUSIVE, HTTP 522)
  • curl against https://lightnovelplus.com/ and /en/detail/1 (522 on each of 3 tries)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

The site moved to a new Nuxt front end (en/detail/<id>, JSON chapter
payloads, no ajax chapter list), which the readnovelfull template can no
longer parse. Replace the generated source with a standalone plugin that
keeps the id and name.
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] Migrates a novel-scraping plugin to a new architecture.

The PR appears safe to merge, with non-blocking fixes recommended for genre text and request deadlines.

Findings

  1. P2 Genre names run together ▶
  2. P2 Slow requests outlive their deadline ▶

Summary

Replaces the generated LightNovelPlus adapter with a standalone plugin for the redesigned site.

  • LightNovelPlus listings and search use the redesigned site's pages.
  • Readers can open LightNovelPlus novels and get their details and chapters.

RibatTRW acknowledged that HTTP 522 prevented live checks and deferred the playground screenshot until the site is reachable.

Reviews (1) · Last reviewed commit: "no-mistakes(document): Fix stale lightno..." · Reviewed by Greptile

.toLowerCase();
const value =
label === 'author' || label === 'genre'
? row.children('a').text().trim()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Genre names run together

parseNovel reads all genre links with .text(), which drops separators between the links. If a row contains separate Action and Fantasy links, it returns ActionFantasy instead of the comma-separated list required by SourceNovel.genres. Read each link separately and join its text with commas.

Comment on lines +89 to +95
const response = await Promise.race([
fetchApi(url),
this.sleep(ATTEMPT_TIMEOUT_MS).then(() => null),
]);
if (response) {
status = response.status;
if (response.ok) return await response.text();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Slow requests outlive their deadline

The deadline in fetchHtml ends when response headers arrive, before response.text() finishes. If the server sends headers and then stalls, the read can wait indefinitely instead of retrying. When the timer wins, the old request also keeps running while another starts. Apply the deadline to the full response read and cancel expired requests where the host supports it.

@RibatTRW

Copy link
Copy Markdown
Contributor Author

Closing for now: lightnovelplus.com is currently down (Cloudflare 522), so this rewrite cannot be verified against the live site. The branch is kept and will be reopened once the site is reachable and the change has been tested live.

@RibatTRW RibatTRW closed this Oct 15, 2026
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.

1 participant