Fix missing / in Illusia URLs and restore broken parseNovel selectors - #2566
Closed
lucasaugustodeveloper wants to merge 2 commits into
Closed
lucasaugustodeveloper wants to merge 2 commits into
lucasaugustodeveloper wants to merge 2 commits into
Conversation
|
Member
|
This is superseded by the rewrite in #2567. |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
lucasaugustodeveloper
marked this pull request as draft
September 24, 2026 17:10
lucasaugustodeveloper
marked this pull request as ready for review
September 24, 2026 17:10
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.
Checklist
type(scope): description(e.g.feat(<generator>): add new source)Summary
This PR fixes three related problems found in the Portuguese plugins:
without a
/after the domain, e.g.https://illusia.com.brstory/ldm-lorde-dos-misterioinstead ofhttps://illusia.com.br/story/ldm-lorde-dos-misterio/.parseNovelfailed to extract the novelname, cover, and summary because the site switched to a new theme
(
illusia-single-story__*CSS classes), invalidating the old selectors.parseNovelreturned zerochapters because the site changed its template — the
#clwdelement the pluginscraped for the series category label now only exists inside a
<script>(builtat runtime via JS), and is no longer part of the rendered DOM.
Root cause analysis
1. Illusia — missing
/in URLsThe plugin normalized every novel/chapter path by stripping both the leading and
trailing slashes:
The plugin also had no
resolveUrldefined (an existing implementation was leftcommented out at the bottom of the file). When a plugin does not implement
resolveUrl, the LNReader app falls back to a plainsite + pathconcatenation,producing:
2. Illusia — outdated selectors after theme change
A live check against the site showed the current markup uses a custom Illusia theme:
<h1 class="illusia-single-story__title">(wash1.story__identity-title)<img class="illusia-single-story__cover-img" data-src="...">(was
figure.story__thumbnail img)<div class="illusia-single-story__description">(was
section.story__summary)Author (
a[href*="/author/"]), genres (div.tag-group > a), status(
span.story__status), chapter list (li.chapter-group__list-item), and chaptercontent (
section#chapter-content) were verified against the live pages and stillmatch, so they were left untouched.
3. Blog do Amon Novels — chapter list extraction broken
The old implementation derived the Blogger series label from the text of a
#clwdelement:
The site's new template builds
#clwddynamically via jQuery inside a<script>tag, so it no longer exists in the raw HTML and
catbecameundefined, fallinginto a branch that scraped a now-absent
#chapterselement and returned 0 chapters.The new template declares the label inline in the page:
Fetching
feeds/posts/default/-/{categoria}?alt=jsonwith that extracted labelreturns the full chapter feed (confirmed against the live site: 394 entries for the
tested novel).
Changes
plugins/portuguese/illusia.ts(1.0.2→1.0.3)resolveUrlso paths keep their current normalized form and the appbuilds correct absolute URLs:
parseNovelselectors (old ones kept as fallbacks):h1.illusia-single-story__titleimg.illusia-single-story__cover-img(data-srcfirst, sincesrcholds an SVG lazy-load placeholder)div.illusia-single-story__descriptionplugins/portuguese/blogdoamonnovels.ts(1.0.1→1.0.2)#clwdmethodas a fallback:
Other plugins audited
The remaining plugins in
plugins/portuguese/were checked for the missing-slashbug and do not have it, so they were left unchanged:
tsundoku.ts/(.replace(this.site, '')), so the app'ssite + pathfallback already yields a valid URLnovelmania.ts/novels/...and the plugin already implementsresolveUrlTesting
All four plugins in
plugins/portuguese/were exercised against their live siteswith
npm run check:plugin:popularNovelssearchNovelsparseNovelparseChapterillusia.tsblogdoamonnovels.tstsundoku.tsnovelmania.tsURL construction verified in the check output:
https://illusia.com.br/story/ldm-lorde-dos-misterios/(correct, with/).ESLint and Prettier pass on both modified files with no warnings.