From 5a986c7b73549bf86fc44e27c24c0bea3255a02f Mon Sep 17 00:00:00 2001 From: Rajarshee Chatterjee Date: Sat, 22 May 2021 09:41:26 +0530 Subject: [PATCH] WuxiaWorldCo: Fix chapterUrl --- src/en/readlightnovel/ReadLightNovelScraper.js | 5 ++++- src/en/wuxiaworldco/WuxiaWorldCoScraper.js | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/en/readlightnovel/ReadLightNovelScraper.js b/src/en/readlightnovel/ReadLightNovelScraper.js index 977ea85..48c6b0d 100644 --- a/src/en/readlightnovel/ReadLightNovelScraper.js +++ b/src/en/readlightnovel/ReadLightNovelScraper.js @@ -156,7 +156,10 @@ const chapterScraper = async (req, res) => { $(".hidden").remove(); let chapterText = $(".desc").html(); - chapterText = htmlToText(chapterText).replace(/\n\nSponsored Content\n\n/g, ""); + chapterText = htmlToText(chapterText).replace( + /\n\nSponsored Content\n\n/g, + "" + ); let nextChapter = null; diff --git a/src/en/wuxiaworldco/WuxiaWorldCoScraper.js b/src/en/wuxiaworldco/WuxiaWorldCoScraper.js index 5952bfd..80d1f5f 100644 --- a/src/en/wuxiaworldco/WuxiaWorldCoScraper.js +++ b/src/en/wuxiaworldco/WuxiaWorldCoScraper.js @@ -68,9 +68,7 @@ const novelScraper = async (req, res) => { $(".chapter-item").each(function (result) { const chapterName = $(this).find(".chapter-name").text(); const releaseDate = null; - const chapterUrl = $(this) - .attr("href") - .replace("/" + novelUrl + "/", ""); + const chapterUrl = $(this).attr("href").split("/")[2]; novelChapters.push({ chapterName,