WuxiaWorldCo: Fix chapterUrl
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user