Skip to content

fix(arabic/galaxynovels): load the full chapter list from the manifest pack - #2760

Merged
rajarsheechatterjee merged 2 commits into
lnreader:masterfrom
Gourab0002:fix/arabic-galaxynovels-chapter-pagination
Oct 24, 2026
Merged

rajarsheechatterjee merged 2 commits into
lnreader:masterfrom
Gourab0002:fix/arabic-galaxynovels-chapter-pagination

Conversation

@Gourab0002

Copy link
Copy Markdown
Contributor

Closes #2667

What changed

  • plugins/arabic/galaxynovels.ts: in parseNovel, if the chapters container's data-index-url is empty, fetch data-manifest-url and use its pack_url as the chapter index. The existing JSON mapping and the HTML fallback are unchanged.
  • Version bumped 1.1.0 → 1.1.1.
  • The repo's pre-commit Prettier hook also reflowed a few existing lines in this file. Those changes are whitespace only.

Why

Galaxy Novels changed its novel page. data-index-url="" is now empty and the page renders only 30 chapters (data-per-page="30"). The full list lives in a cached manifest → pack:

data-manifest-url=".../wor-reader-cache/chapters/manifest/novel-315985.json"
  -> { "total": 492, "pack_url": ".../wor-reader-cache/chapters/packs/novel-315985-<version>.json" }
  -> { "chapters": [ 492 items, same shape as the old index: id, position, label, title, date_iso, ... ] }

With no index URL, the plugin fell back to scraping the HTML, which only has the first 30 chapters.

How it was verified

  • npm run check:plugin -- plugins/arabic/galaxynovels.ts
    • before: popularNovels PASS (20), searchNovels PASS, parseNovel 30 chapters, parseChapter FAIL (404)
    • after: popularNovels PASS (20), searchNovels PASS, parseNovel 1797 chapters, parseChapter FAIL (404)
  • npx eslint plugins/arabic/galaxynovels.ts: pass
  • npx tsc --project tsconfig.production.json --noEmit: pass
  • npm run build:full: pass

Risks / notes

  • parseChapter fails the same way before and after this change. From this test host, Cloudflare answers /wp-json/wor-reader-app/v1/chapters/<id> with 403, and the HTML fallback <novel>/chapter-<id>/ returns 404. I couldn't confirm chapter reading from here, so this PR doesn't touch it. It may need a follow-up if users also can't open chapters.
  • If the manifest is missing or fails to load, the plugin falls back to the old HTML parsing, which gives the same 30 chapters as before.

Checklist

  • Update version code if an existing plugin was modified
  • Test changes in Plugin Playground or the app (check:plugin against the live site)
  • Reference related issues in the PR body
  • Commit messages follow type(scope): description

Partly authored by an AI agent (Grok Bot), please review with that in mind.

…t pack

Novel pages now leave data-index-url empty and only render the first 30 chapters, so the plugin fell back to HTML parsing and showed 30 chapters. When the index URL is empty, read data-manifest-url and load the full chapter list from its pack_url. Bump version to 1.1.1.

Closes lnreader#2667

Co-Authored-By: Grok Bot (AI agent) <noreply@x.ai>
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Updates galaxynovels.ts to load the full chapter list through the manifest when data-index-url is empty.

  • Galaxy Novels loads chapter lists from the manifest pack when the page has no index URL.

Reviews (1) · Last reviewed commit: "fix(arabic/galaxynovels): load the full ..." · Reviewed by Greptile

…text

Chapter paths were built as <novel>/chapter-<post id>/, which 404s; real URLs are <novel>/chapter-<number>/<slug>/ (the pack's url field). Use those, only call the id-based API for legacy id paths, and read content from .wor-reader-text-surface with the hidden decoy elements removed.

Co-Authored-By: Grok Bot (AI agent) <noreply@x.ai>
@rajarsheechatterjee
rajarsheechatterjee merged commit 6ca7be1 into lnreader:master Oct 24, 2026
3 checks passed
@Gourab0002
Gourab0002 deleted the fix/arabic-galaxynovels-chapter-pagination branch October 25, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GALAXYNOVELS Always shows 30 chapters ONLY.

2 participants