Repository navigation
Conversation
Browse the home page and category listings, open a book with its full chapter list, and read chapters. Pages are GBK and decoded accordingly. Search returns no results: lewenn.com has no search of its own, and its third-party search provider refuses requests from this region.
[Medium impact] The PR appears safe to merge; no actionable issues were established. SummaryAdds 乐文小说网 as a Chinese source.
No actionable issues were established. Reviews (1) · Last reviewed commit: "no-mistakes(review): escape chapter HTML..." · Reviewed by Greptile |
This branch has not been deployed
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.
Part of #125: adds LeWenXiaoShuo (lewenn.com). The other four sites requested there (uuKanShu, BiQuGe, JiuJiuXiaoShuo, 58XiaoShuo) are not covered by this PR, so it does not close the issue.
Intent
Work on #125 and include screenshots of the working fix in the PR.
Issue 125 asked for five Chinese sites (uuKanShu, BiQuGe, JiuJiuXiaoShuo, LeWenXiaoShuo, 58XiaoShuo). Four of them cannot be worked: uukanshu.com refused connections from this machine, xbiquge.so answers 403 "the region has been denied", ajjxsw.com now redirects to a text-download site with no readable chapters, and 58xs8.com is a domain-for-sale parking page. Those four are a separate call for the captain and must not be touched here.
The one that works is LeWenXiaoShuo: lewenn.com returns 200, a book page such as https://lewenn.com/lw11754/ is live, and a chapter such as https://lewenn.com/lw11754/30307582.html returns 200 with readable text in div#content. No plugin or generated source covers lewenn.com today. The site's content is Chinese.
Make sure the fix's pull request shows a photo of the plugin working correctly inside the plugin playground, and run that screenshot process headless if possible.
Captain's decision on search: option A. Ship browse, novel page and chapters now; leave search out (search returns no results rather than calling the region-blocked third-party search). State plainly in the PR that lewenn.com has no search of its own and its third-party search provider refuses requests from this region, with the evidence.
What Changed
plugins/chinese/lewenn.ts, a new standalone source (idlewenn, name 乐文小说网, v1.0.0) that browses lewenn.com by genre (home, 10 categories, and the full-novel list), parses novel metadata (title, author, genres, status, cover, intro), and builds the chapter list from the 正文 block in reading order.#content(GBK-decoded), with scripts, ads, and promotional lines stripped and the paragraphs returned as escaped<p>elements.searchNovelsreturns an empty list because lewenn.com has no search of its own and its third-party search provider is region-blocked, so no request is made.public/static/src/cn/lewenn/icon.png.Risk Assessment
✅ Low: The change is one standalone plugin plus a 96x96 icon, and the prior fix rounds' defects (HTML escaping, guessed covers, metadata fallbacks, chapter fallback) are resolved in the current code, so no source defect survived review.
Testing
Baseline live check passed for all four plugin functions against lewenn.com. In the playground, all five scenarios were driven headlessly against the real product and produced screenshots: browse, novel page with ordered chapters, readable chapter text, search returning no results, and rejection of a traversal-style novel path. The chapter entity-escaping fix was not driven live, because no sample chapter with entity-encoded markup was available, so it is reported as untested. Overall result: pass.
~/.no-mistakes/evidence/01M4ZV0X0XM4PYK523BTYHD8ZM/01-popular-home.png)~/.no-mistakes/evidence/01M4ZV0X0XM4PYK523BTYHD8ZM/02-parse-novel.png)~/.no-mistakes/evidence/01M4ZV0X0XM4PYK523BTYHD8ZM/03-parse-chapter.png)~/.no-mistakes/evidence/01M4ZV0X0XM4PYK523BTYHD8ZM/04-search-no-results.png)~/.no-mistakes/evidence/01M4ZV0X0XM4PYK523BTYHD8ZM/05-adversarial-invalid-novel-path.png)Screenshots
These come from this repo's plugin playground (
npm run dev:start, driven headless), not from the LNReader app. The Android toolchain is not installed on the machine that made this change, so this plugin has not been tested in the app.Popular listing, the 乐文小说网 source with live results:
Parse Novel for lw1700 showing the book's metadata and total chapter count (1008):
The same book's chapter list, in reading order:
Parse Chapter for lw11754/30307582.html showing readable Chinese text:
AI authorship
This change was written by an AI agent (Claude) and the tests were AI-driven. No human has reviewed it yet.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm ci --ignore-scripts(workspace install, no lockfile change)npm run check:plugin -- plugins/chinese/lewenn.ts(live check against lewenn.com: popularNovels PASS 84 novels, searchNovels PASS 0 results, parseNovel PASS 1008 chapters, parseChapter PASS 5573 chars)npm run dev:startplayground at http://localhost:3000, driven with puppeteer-core + /usr/bin/chromium headless (scratch driver in /tmp/lewenn-shot, outside the worktree)Scenario: select 乐文小说网 in the playground sidebar, Popular tab, Fetch on default home listing -> 01-popular-home.pngScenario: Parse Novel with lw11754/ -> title 死囚废皇子, status Completed, author, genres, summary, 377 chapters in reading order (chapter # 1..377) -> 02-parse-novel.pngScenario: Parse Chapter with lw11754/30307582.html -> 2447 characters of readable Chinese text with the chapter title -> 03-parse-chapter.pngScenario: Search tab with 雪中悍刀行 -> 'No results found' and no third-party call -> 04-search-no-results.pngAdversarial scenario: Parse Novel with lw11754/../../etc/ -> '[LeWenn] Invalid novel path' error, no fetch -> 05-adversarial-invalid-novel-path.pngWorktree left clean (git status empty) after stopping the dev server. Lint and format were not run, per test-phase rules.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.