FreeWebNovel: fix novelChapters

This commit is contained in:
Rajarshee Chatterjee
2021-05-14 13:37:55 +05:30
parent 770d821a0a
commit 67585263de
+9 -3
View File
@@ -90,9 +90,15 @@ const novelScraper = async (req, res) => {
let novelChapters = [];
let latestChapter = $("div.col-l > ul > li > div.txt > div > span.s3")
.text()
.match(/\d+/);
let latestChapter;
$("h3.tit").each(function (res) {
if ($(this).find("a").text() === novel.novelName) {
// console.log($(this).find("a").text());
// console.log(novel.novelName);
latestChapter = $(this).next().find("span.s3").text().match(/\d+/);
}
});
latestChapter = latestChapter[0];