Repository navigation
Conversation
Implements popular/latest/search, novel details, chapter list and chapter content for https://www.toasteful.com/ (English, Blogger), using the site's own Web Novel label feed for listings and search. Closes lnreader#458. Test evidence: npm run check:plugin passes 4/4 (popular 25 novels, search, parseNovel 12 chapters, parseChapter 13698 chars); extended live assertions 23/23 incl. 395-chapter hub, volume prefixes, side-route exclusion and chapter cleanup. Co-Authored-By: Muse Spark <muse-spark@meta.com>
|
Comment on lines
+312
to
+317
| for (let round = 0; round < 4 && novels.length < wanted; round++) { | ||
| const params = new URLSearchParams({ | ||
| 'alt': 'json', | ||
| 'q': searchTerm, | ||
| 'max-results': '150', | ||
| 'start-index': String(start), |
There was a problem hiding this comment.
searchNovels stops after 600 matching posts and only then keeps posts labeled Web Novel. If matching chapter posts fill that window before a novel's index page, readers get empty or incomplete results even though the novel matches. Later pages scan the same window and cannot recover it.
Restrict the feed search to Web Novel and page those results instead of filtering all posts after a fixed number of requests.
…d out matches Blogger ignores the /-/label path once q is present, so a q search returns chapter posts that crowd matching novels out of the window. Search the Web Novel label feed instead and match titles client-side. Bump version to 1.0.1.
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.
Intent
Add a Toasteful source plugin to lnreader-plugins for #458. The source is Toasteful at https://www.toasteful.com/ (English), with the series list at https://www.toasteful.com/p/list-novel.html. Implement the full source (popular/latest/search, novel details, chapter list, chapter content) following the repos existing plugin template and docs/testing.md. Include screenshots of the working fix in the PR, and run the plugin verification headless in the background.
Testing with screenshots
Follow-up:
searchNovelsnow pages the Web Novel label feed and matches titles client-side, so chapter posts can no longer crowd matching novels out (Greptile P1 addressed). Verified live: "hero" returns 18 novels, "dungeon demon lord" returns its hub, "hero mother" returns the hub plus side stories.Site (headless capture of toasteful.com):
Series list at
/p/list-novel.html, grouped On-going / Others.Novel hub with cover, genres, summary and the full chapter list.
Chapter text as the plugin returns it — story only, promo and nav stripped.
Playground (plugin running inside the repo playground):
Toasteful popular grid rendered by the playground (
npm run dev:start).Hero-mother hub in the playground: cover, Ongoing status, 395 chapters, genres, summary.
What Changed
Final changed paths and statuses:
Risk Assessment
✅ Low: New standalone scraper with bounded feed/DOM logic; live hub markup confirms Chapter-gated links, here-hub exclusion, and search token matching behave as intended.
Testing
Drove the real Toasteful plugin against the live site: the repo's live-check harness passed popular (25 novels), search, novel parse (12 chapters), and chapter parse (13737 chars); a focused script against the bundled plugin confirmed the word-boundary chapter-link fix rejects 'The Departed Hero'/'Party'/'Particular' promos while accepting genuine chapter links, confirmed latest-novels ordering works live, and confirmed malformed feed entries are skipped safely.
node .lavish/toast-check.cjsLATEST live: 25 novelsnode .lavish/toast-check.cjsALL ADVERSARIAL CASES PASSEDnode .lavish/toast-check.cjsMALFORMED -> undefined, undefinedEvidence: Toasteful live-check output