novelhall: fix novel chapters
This commit is contained in:
@@ -80,23 +80,25 @@ router.get("/novel/:novelUrl", (req, res) => {
|
|||||||
|
|
||||||
let novelChapters = [];
|
let novelChapters = [];
|
||||||
|
|
||||||
$("li.post-11").each(function (result) {
|
$("div.book-catalog.hidden-xs#morelist")
|
||||||
let chapterName = $(this).find("a").text();
|
.find("li.post-11")
|
||||||
|
.each(function (result) {
|
||||||
|
let chapterName = $(this).find("a").text();
|
||||||
|
|
||||||
let releaseDate = null;
|
let releaseDate = null;
|
||||||
|
|
||||||
let chapterUrl = $(this).find("a").attr("href");
|
let chapterUrl = $(this).find("a").attr("href");
|
||||||
|
|
||||||
if (chapterUrl) {
|
if (chapterUrl) {
|
||||||
chapterUrl = chapterUrl.replace(`/${novelUrl}/`, "");
|
chapterUrl = chapterUrl.replace(`/${novelUrl}/`, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
novelChapters.push({
|
novelChapters.push({
|
||||||
chapterName,
|
chapterName,
|
||||||
releaseDate,
|
releaseDate,
|
||||||
chapterUrl,
|
chapterUrl,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
novel.novelChapters = novelChapters;
|
novel.novelChapters = novelChapters;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user