Skip to content

Add parser for novelping.com - #3013

Merged
gamebeaker merged 2 commits into
dteviot:ExperimentalTabModefrom
rajyashau:novelping-parser
Sep 28, 2026
Merged

gamebeaker merged 2 commits into
dteviot:ExperimentalTabModefrom
rajyashau:novelping-parser

Conversation

@rajyashau

Copy link
Copy Markdown

Resolves #3012

Problem

novelarrow.com now redirects to novelping.com, and the site has moved back to the old Novelbin page layout. There is no parser registered for novelping.com, so WebToEpub falls back to the Default Parser. The chapter list on the novel page sits inside a <template>, so the Default Parser only picks up the few chapter links outside it and users get a handful of chapters instead of the whole novel.

Change

Adds NovelpingParser to NovelfullParser.js. It extends NovelbinParser, since the markup (title, author, genres, tags, cover, description, #chr-content, chapter h2) is the same. It differs in four places:

  • The full chapter list comes from the site's own /ajax/chapter-archive?novelId=<slug> endpoint, requested on the page's host. NovelbinParser hard-codes novelbin.com, which no longer resolves.
  • Chapter titles come from each link's title attribute, because the link text also holds the comment count (Chapter 1 Nightmare Begins 17).
  • The slug is read from either ToC form, /novel/<slug> or /book/<slug>.
  • The empty .js-ad-slot placeholders are removed from chapter content, and the publisher is set to NovelPing.

NovelbinParser and NovelarrowParser are unchanged. One note: the Next.js layout NovelarrowParser was written for no longer exists. novelarrow.com pages now 302 to novelping.com, so users end up on this parser in the browser. I left NovelarrowParser alone in case you'd prefer to handle that separately.

Testing

  • Unit tests: added tests for the host-to-parser mapping, slug extraction, chapter-list extraction (clean titles without the comment count) and ad-slot removal, using markup taken from the live site.
  • Full suite: ran it in Firefox 156 and Chrome, on unmodified ExperimentalTabMode and with this change. The results are the same apart from the 4 new tests, which pass. EpubPacker :: buildEpub3ContentOpf and UtestRoyalRoadParser :: makeHiddenElementsVisible already fail without this change. In both runs the suite also stops at WattpadParser :: fetchExtraChapterContent, which requests s.wattpad.com.
  • Lint: npm run lint passes.
  • Live site: loaded the Firefox build as a temporary add-on and ran it against novelping.com:
    • Shadow Slave: all 3192 chapters listed, which matches the site's own count. Title, author and cover are filled in, and there are no errors.
    • In the 1970s, I became the villainous female supporting character in a period novel: packed a complete EPUB. It has all 40 chapters with full text, the cover, an information page, author, publisher and subjects, and no leftover site elements.

novelarrow.com now redirects to novelping.com, which is back on
Novelbin's layout. With no parser registered for the host, the
Default Parser only found the few chapter links outside the
<template> holding the chapter list.

NovelpingParser reuses NovelbinParser, fetching the full list from
the site's /ajax/chapter-archive on the page's own host and taking
chapter titles from the link's title attribute, as the link text
also holds the comment count.
@gamebeaker

Copy link
Copy Markdown
Collaborator

@rajyashau thanks for your work.

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.

Please add site https://novelping.com

3 participants