From 1cf5ae86c8fd9f4dc3801d08262f779e5343a0d6 Mon Sep 17 00:00:00 2001 From: dteviot Date: Tue, 24 Oct 2023 19:56:06 +1300 Subject: [PATCH] Update site https://creativenovels.com/ See: https://github.com/dteviot/WebToEpub/issues/1098 --- plugin/js/parsers/CreativeNovelsParser.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugin/js/parsers/CreativeNovelsParser.js b/plugin/js/parsers/CreativeNovelsParser.js index c5af93f5..6c43a601 100644 --- a/plugin/js/parsers/CreativeNovelsParser.js +++ b/plugin/js/parsers/CreativeNovelsParser.js @@ -1,6 +1,3 @@ -/* - https://fantasy-books.live/ was renamed to creativenovels.com -*/ "use strict"; parserFactory.register("creativenovels.com", function() { return new CreativeNovelsParser() }); class CreativeNovelsParser extends Parser{ @@ -8,14 +5,13 @@ class CreativeNovelsParser extends Parser{ super(); } - getChapterUrls(dom) { - let chapters = [...dom.querySelectorAll("div.post_box a")] + async getChapterUrls(dom) { + return [...dom.querySelectorAll("div#chapter_list_novel_page, div.post_box a")] .map(a => util.hyperLinkToChapter(a)); - return Promise.resolve(chapters); } findContent(dom) { - return dom.querySelector("div.content"); + return dom.querySelector("div.entry-content.content"); }; removeUnwantedElementsFromContentElement(element) {