From b75f61ca57d6f978b318710a312de7ad08395438 Mon Sep 17 00:00:00 2001 From: kanasimi Date: Wed, 31 Jul 2024 07:57:55 +0800 Subject: [PATCH] fix quanben.js --- novel.cmn-Hans-CN/quanben.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/novel.cmn-Hans-CN/quanben.js b/novel.cmn-Hans-CN/quanben.js index 36aac22d..b87a8ce0 100644 --- a/novel.cmn-Hans-CN/quanben.js +++ b/novel.cmn-Hans-CN/quanben.js @@ -173,11 +173,32 @@ var crawler = new CeL.work_crawler({ this.check_next_chapter(work_data, chapter_NO, html); var chapter_data = work_data.chapter_list[chapter_NO - 1], - // - text = html.between('
', '
'); + /** + * 2024/7/7 e.g., + +
+
+

...

...

+
+
+ ... +
+ +
+ */ + text = html.between('
').replace( + /]*><\/div>/g, '').between(null, '
'); + + // 去除註解。 Remove comments. + text = text.replace(/<\!--[\s\S]*?-->/g, ''); + + // 有些章節會先以章節標題起頭。 + text = CeL.work_crawler.trim_start_title(text, chapter_data); text = CeL.work_crawler.fix_general_censorship(text); + text = text.trim(); + this.add_ebook_chapter(work_data, chapter_NO, { title : chapter_data.part_title, sub_title : chapter_data.title