Repository navigation
feat(spanish): add Novelas MTL source - #2892
Conversation
Add a standalone plugin for the Novelas MTL blog (sinacortadores.com): catalogue from the index pages, chapter lists from each novel page and chapter text from the Blogger posts. Search matches catalogue titles because the blog search only returns chapter posts.
[Low impact] The PR adds one source to LNReader's source choices. The PR appears safe to merge, with a non-blocking fix recommended so catalogue outages do not look like empty search results. Findings
SummaryAdds the Spanish Novelas MTL source for sinacortadores.com.
Reviews (1) · Last reviewed commit: "feat(spanish): add Novelas MTL source" · Reviewed by Greptile |
| const pages = await Promise.all( | ||
| INDEX_PAGES.map(page => this.getHtml(page).catch(() => '')), | ||
| ); |
There was a problem hiding this comment.
catalogue() turns every failed request into an empty page. If the site is down or rejects all four requests, browse and search return [] as though the catalogue were empty. Search then shows “No results found” instead of an error, hiding the reason readers cannot find novels.
Keep the per-page fallback if needed, but throw when no index page loads.
Knowledge Base Used: Plugin authoring contract
There was a problem hiding this comment.
Throw when none of the index pages loads instead of returning an empty list.
…age and chapter fetch goes through the blog's JSON feed instead of the throttled HTML pages. I applied your reference patch from `/tmp/claude-1000/lnq34/feed.patch` unchanged. - **Feed fetches:** `/p/...` pages use `/feeds/pages/default?alt=json&path=...` and posts use `/feeds/posts/default?...`. The entry's `content.$t` is wrapped in `<div class="post-body">`, so the existing selectors and cleaning still apply. The novel name now comes from `title.$t`. - **Index pages:** the four index pages load one after another. A failing extra page is tolerated. If none loads, the first error is thrown, so a failed catalogue doesn't look empty. - **429 handling:** one retry after a pause that follows `Retry-After`, clamped between 2s and 10s. The shared live-check tooling is untouched, and I left the version at 1.0.0 because the plugin hasn't been released yet. **Checks:** eslint and prettier are clean. `npm run check:plugin -- plugins/spanish/novelasmtl.ts` passes all four steps: 42 novels, 1 search result, 86 chapters, 24,805 chars. That run was from my machine, not the CI runner, so it doesn't show whether the 429 is gone there. The CI re-run will
Summary
Adds a standalone Spanish source for Novelas MTL (https://www.sinacortadores.com/), a Blogger site with machine-translated Spanish novels (Korean, Japanese, Chinese and English originals).
Fixes #592
Testing
npm run build:fullsucceeds; eslint and prettier are clean on the changed files.npm run check:plugin -- plugins/spanish/novelasmtl.ts: popularNovels, searchNovels, parseNovel and parseChapter all PASS (42 novels, 86 chapters on the first novel, 24838 chars of chapter text).Screenshots
Screenshots are from the repository's plugin playground (headless browser), not from the LNReader app. The "Issue reports are unavailable" box is a separate playground widget that could not reach its external service.
Popular listing:
Search ("regresor"):
Novel details:
Chapter list:
Chapter text:
Authorship
This change was written and tested by an AI coding agent (Claude) and reviewed by an automated pipeline only. No human has reviewed it yet.