Skip to content

Commit

Permalink
Fix: Novelbin has multiple host aliases for chapters
Browse files Browse the repository at this point in the history
See: #1345
  • Loading branch information
dteviot committed Jun 15, 2024
1 parent 0ddf44d commit 1fb194c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugin/js/parsers/NovelfullParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,21 @@ parserFactory.register("readnovelfull.me", () => new NovelfullParser());
parserFactory.register("thenovelbin.org", () => new NovelfullParser());
parserFactory.register("topnovelfull.com", () => new NovelfullParser());

parserFactory.registerUrlRule(
url => NovelfullParser.IsNovelfullHost(url),
() => new NovelfullParser()
);

class NovelfullParser extends Parser{
constructor() {
super();
}

static IsNovelfullHost(url) {
let host = ParserFactory.hostNameForParserSelection(url);
return host.endsWith(".novelcenter.net") || host.endsWith(".noveljar.org");
}

async getChapterUrls(dom, chapterUrlsUI) {
return this.getChapterUrlsFromMultipleTocPages(dom,
this.extractPartialChapterList,
Expand Down

0 comments on commit 1fb194c

Please sign in to comment.