From ebd84872c341c2746522dfe8d95c8acaa55b27d3 Mon Sep 17 00:00:00 2001 From: Rajarshee Chatterjee Date: Mon, 4 Jan 2021 22:43:45 +0530 Subject: [PATCH] boxnovel: fix novel description --- src/en/boxnovel/boxnovel.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/en/boxnovel/boxnovel.js b/src/en/boxnovel/boxnovel.js index 10b9fba..cd11701 100644 --- a/src/en/boxnovel/boxnovel.js +++ b/src/en/boxnovel/boxnovel.js @@ -88,7 +88,15 @@ router.get("/novel/:novelUrl", (req, res) => { novel[detailName] = detail; }); - novel.novelSummary = $(".c_000").text(); + $(".description-summary > div.summary__content").find("em").remove(); + + novel.novelSummary = $(".description-summary > div.summary__content") + .text() + .replace(/[\t\n]/g, ""); + + // if (novel.novelSummary === "") { + // novel.novelSummary = $(".c_000").text(); + // } let novelChapters = [];