revert chapter object

This commit is contained in:
Rajarshee Chatterjee
2021-03-27 10:18:43 +05:30
parent 48b8dc82c5
commit aca3fba58a
2 changed files with 34 additions and 10 deletions
+11 -6
View File
@@ -97,23 +97,28 @@ router.get("/novel/:novelUrl", (req, res) => {
$(".tab-content")
.find("li")
.each(function (result) {
let name = $(this)
chapterName = $(this)
.find("a")
.text()
.replace(/[\t\n]/g, "")
.trim();
date_upload = null;
releaseDate = null;
// $(this)
// .find("span")
// .text()
// .replace(/[\t\n]/g, "")
// .trim();
chapter_url = $(this)
chapterUrl = $(this)
.find("a")
.attr("href")
.replace(baseUrl, "");
novelChapters.push({
name,
date_upload,
chapter_url: chapter_url.replace(`/${novelUrl}/`, ""),
chapterName,
releaseDate,
chapterUrl: chapterUrl.replace(`/${novelUrl}/`, ""),
});
});