Repository navigation
Conversation
|
Greptile encountered an error while reviewing this PR. Please reach out to support@greptile.com for assistance and include this reference: |
2 of 4 tasks
…el Ping Add opt-in `hasLocked` (`hideLocked` Switch setting) and `chapterFormat: "json"` support in `readnovelfull/template.ts`, and enable them for Novel Ping so paid (`premium` / `platinum`) chapters are marked with a lock icon or hidden when the toggle is enabled. Closes lnreader#2953 Co-Authored-By: Antigravity <noreply@google.com>
…and promo stripping - Replace Novel Ping's Cheerio `customJs` pass with streaming `stripClasses: ["app-promo"]` inside `parseChapter` and pause `htmlparser2` when the chapter root closes. - Replace `new URL(...)` in `resolvePath` with allocation-free `indexOf`/`slice` parsing. - Hoist module-level regexes/maps/cover picker, add early exits in parser text handlers, remove redundant spread copies, and skip the final-page sleep in `fetchChapterPageWithRetry`. Co-Authored-By: Antigravity <noreply@google.com>
…mp minor to 2.4.x
- Bump base template version from `2.3.${5 + versionIncrements}` to `2.4.${versionIncrements}` to reflect the new `hideLocked` feature.
- Fix `resolvePath` to bound `/` search against `?` and `#` so pathless URLs with slashes in query/hash return `""`.
- Rename `fetchHtml` to `fetchText` (`{ body, url, notFound }`) and deduplicate JSON parsing via `parseJsonObject`.
- Require JSON directly when `chapterFormat === 'json'` and remove unused HTML locked-badge fallback from `ajaxParser`.
Co-Authored-By: Antigravity <noreply@google.com>
Member
|
Let’s hold off on merging until LNReader ships a release that exports |
… and add ranking filters
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.
Checklist
type(scope): description(e.g.feat(<generator>): add new source)Related to #2946 (
readnovelfull.comitself is currently returning HTTP 521), #2422 / #2819 / #2179 (novelfull.comitself is currently returning HTTP 404), #2335 (Latest Novelsadded as a filter option while keeping theLatesttab onsort/latest-releaseper #2332), and #2952 (100/100 covers verified valid in HTML across pages 1–5; intermittent blanks on Android are Cloudflare image request concurrency). Implements #2953 and resolves #2349, #2303, #2917, and #2359.Summary
@libs/pluginError): Surface real HTTP/challenge/rate-limit/empty-content failures instead of generic strings or empty results.hasLocked+chapterFormat: 'json'):hasLocked(hideLockedSwitchsetting read dynamically viastorage.get('hideLocked')) andchapterFormat: 'json'toplugins/multisrc/readnovelfull/template.ts.novelpinginplugins/multisrc/readnovelfull/sources.jsonto fetchajax/chapter-option?novelId=<id>&format=json, detectingpremium/platinumflags, prefixing locked chapters with🔒by default, and omitting them whenhideLockedis enabled.FWN.com):stripClasses: ["reader-ad-skip", "fnw-content-state", "pubadx-slot"]toFWN.cominplugins/multisrc/readnovelfull/sources.jsonto remove inline ad scripts (platform.pubadx.one) and"Almost there! Your next chapter is loading"fallback images (wait-*.webp) during streaming chapter parsing.plugins/multisrc/readnovelfull/filters/FWN.com.jsonNovel Typepicker with all live-verifiedMost Popularrankings (All Visit,Day Visit,Week Visit,Month Visit,Recommended,Collected,Completed),Latest Novels(sort/latest-novel), andCompleted Novels(sort/completed-novel).customJspass with streamingstripClasses: ['app-promo']insideparseChapterand callsparser.pause()once the chapter root<div>closes.new URL(...)inresolvePathwith query/hash-boundedindexOf/sliceparsing, hoists module-level regexes/lookup tables/pickCoverAttr, adds parserontextearly returns, avoids redundant{ ...temp }clones, and skips the 150ms sleep after the final paginated chapter page.2.3.${4 + versionIncrements}→2.4.${versionIncrements}across all 8plugins/multisrc/readnovelfullsources.Evidence
popularNovels,parseNovel,parseChapter,searchNovelsthrew plainErrors without.code/.statusor missed challenge/soft-404/rate-limit HTML pages.parseNovelAJAX logged non-OK statuses and returnedchapters = [];fetchChapterPageWithRetryreturnednull→[]after retries; invalid JSON payloads ({"error":...},[]) silently yielded 0 chapters.parseChapterreturned an empty#chr-contentwrapper (or<script>/<style>-only ad markup) instead ofPluginError.EmptyContent, Novel Ping ran a full Cheerio DOM parse/serialize on every chapter, and FreeWebNovel chapters leaked<div class="reader-ad-skip ...">/<div class="fnw-content-state ...">ad/loading placeholders.novelpinghad nohideLockedsetting and did not filter or mark paid chapters;FWN.comlacked theMost Popularsub-rankings (dayvisit,weekvisit,monthvisit,recommended,collected,completed),sort/latest-novel, andsort/completed-novelfilters.node:httpsuites (35 base cases + 19 review-edge cases): 54/54 PASS.parseNovel,parseChapterwith 200KB trailing HTML in2.3ms,resolvePathquery/hash edge cases, and@libs/pluginErrornon-JSON rejection checks): ALL TESTS PASSED.node:httpsuite (against cached The Mech Touch chapter 5483, syntheticfnw-content-state+reader-ad-skipad-loading markup, and cachedsort/latest-releaseHTML acrosssort/most-popular/dayvisit&sort/latest-novelpages 1–2): ALL TESTS PASSED (12,369chars,0<script>,0<ins>,0reader-ad-skip/fnw-content-state,14Novel Typeoptions).200 OK(20 novels/page, including page-2 pagination) across/sort/latest-novel,/sort/completed-novel,/sort/most-popular/{dayvisit,weekvisit,monthvisit,recommended,collected,completed}, and/novel/the-mech-touch/chapter-5483(4,451text chars,0<script>,0<img>inside cleaned.txt).node --test scripts/plugin-error.test.js: 4/4 PASS.prettier --check,eslint --max-warnings 0,npm run build:multisrc,npm run build:compile: all exit0.npm run check:plugin:plugins/english/AllNovelFull[readnovelfull].ts(novgo.net)popularNovels20 novels,searchNovels7 results,parseNovel2166 chapters,parseChapter4912 charsplugins/english/NovelPing[readnovelfull].ts(novelping.com)siteReachability: HTTP 403 (Cloudflare)plugins/english/ReadNovelFull[readnovelfull].ts(readnovelfull.com)siteReachability: HTTP 521plugins/english/FreeWebNovel[readnovelfull].ts(freewebnovel.com)siteReachability: HTTP 403 (Cloudflare); verified live in Chromium X11 after TurnstileMerge Danger
Door: Two-way
Three files inside the
readnovelfullmultisrc generator (plugins/multisrc/readnovelfull/template.ts,plugins/multisrc/readnovelfull/sources.json, andplugins/multisrc/readnovelfull/filters/FWN.com.json); trivial to revert.Blast Radius: Medium
Applies to all 8
readnovelfullmultisrc plugins (readnovelfull,allnovel,lightnovelplus,novelfull,libread,anf.net,novelping,FWN.com);hasLockedandchapterFormatare enabled only fornovelping,stripClassesis enabled only fornovelpingandFWN.com, andfilters/FWN.com.jsonapplies only toFWN.com; live-verified onnovgo.netandfreewebnovel.comwith no regressions.Closes #2953
Closes #2349
Closes #2303
Closes #2917
Closes #2359
AI-assisted via Antigravity.