Skip to content

feat(spanish): add Novelas MTL source - #2892

Merged
rajarsheechatterjee merged 3 commits into
lnreader:masterfrom
RibatTRW:fm/lnreader-queue-34
Nov 12, 2026
Merged

rajarsheechatterjee merged 3 commits into
lnreader:masterfrom
RibatTRW:fm/lnreader-queue-34

Conversation

@RibatTRW

@RibatTRW RibatTRW commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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).

  • Fetching: pages and chapter posts are read through the blog's public JSON feed (full content, one request each) rather than the HTML pages, because the HTML pages answered HTTP 429 to the CI runner. Index pages are fetched one after another, with one retry after a pause on 429, and a catalogue that cannot be loaded raises an error instead of looking empty.
  • Browse: the catalogue is read from the site's novel index pages (42 novels, no pagination), with covers.
  • Novel details: each novel page provides the synopsis and a chapter index; chapters are the Blogger posts it links to (some posts contain several chapters, so the name shows the range, e.g. "Capítulos 1 - 2 - 3"). Chapter lists are returned in site order; the longest one checked had 563 chapters.
  • Chapter text: the post body, with the cover banner, "Anterior - Índice - Siguiente" navigation and the closing share request removed.
  • Search: the blog's own search only returns individual chapter posts, so search matches the catalogue titles instead.
  • Icon: the site only offers a generic 16px Blogger favicon, so the icon is a plain generated "MTL Novelas" tile.
  • Known site-side gaps: a few series on the index no longer list chapters on this site (one now links to anslid.com, which already has its own plugin here; another lists none). Opening them shows a clear error instead of an empty list.

Fixes #592

Testing

  • npm run build:full succeeds; 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).
  • Parsed a sample of other novels in the playground (136 to 563 chapters, synopses, covers); two sampled novels returned the site-side errors described above.
  • The CI Plugin Live Check passes on the final commit.
  • Not tested in the LNReader app. No Cloudflare challenge is involved; the site is served plain.

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:

Plugin playground: Novelas MTL listing

Search ("regresor"):

Plugin playground: Novelas MTL search

Novel details:

Plugin playground: novel details and synopsis

Chapter list:

Plugin playground: chapter list

Chapter text:

Plugin playground: 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.

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.
@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[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

  1. P2 Catalogue failures look empty ▶

Summary

Adds the Spanish Novelas MTL source for sinacortadores.com.

  • Readers can browse and search Novelas MTL's Spanish novel list.
  • Opening a novel shows its details and chapter list.
  • Chapter pages return cleaned text for reading.

Reviews (1) · Last reviewed commit: "feat(spanish): add Novelas MTL source" · Reviewed by Greptile

Comment thread plugins/spanish/novelasmtl.ts Outdated
Comment on lines +66 to +68
const pages = await Promise.all(
INDEX_PAGES.map(page => this.getHtml(page).catch(() => '')),
);

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 Catalogue failures look empty

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 3badc30: catalogue() now throws the first error when none of the index pages loads instead of returning an empty list. The follow-up 7215be4 keeps that behaviour while moving the fetches to the blog's JSON feed (sequential index requests, one Retry-After retry).

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
@rajarsheechatterjee
rajarsheechatterjee merged commit d394131 into lnreader:master Nov 12, 2026
3 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Novelas MTL

2 participants