NovelPassion & RoyalRoad: Minor fixes

This commit is contained in:
Rajarshee Chatterjee
2021-06-30 07:28:14 +05:30
parent 7300bad8a2
commit bfaf1981d0
2 changed files with 7 additions and 5 deletions
+5 -4
View File
@@ -61,7 +61,7 @@ const novelScraper = async (req, res) => {
novelName = $("h2.mh").text();
novel.novelName = novelName;
novel.novelCover = $("#thumbnail > img").attr("src");
novel.novelCover = baseUrl + $("i.g_thumb > img").attr("src");
let novelSummary = $("div.j_synopsis").html();
novel.novelSummary = htmlToText(novelSummary);
@@ -78,9 +78,10 @@ const novelScraper = async (req, res) => {
case "Author:":
novel["Author(s)"] = detail.trim().replace(/ - /g, ", ");
break;
case "Status:":
novel.Status = detail.trim();
break;
}
if (detailName.includes("Status:")) {
novel.Status = detailName.replace("Status:", "").trim();
}
});
+2 -1
View File
@@ -59,8 +59,9 @@ const novelScraper = async (req, res) => {
novelName = $("h1").text();
novel.novelName = novelName;
novel["Author(s)"] = $("h1").next().text().replace("by ", "").trim();
novel.novelCover = $("#thumbnail > img").attr("src");
novel.novelCover = $("img.thumbnail").attr("src");
novel.novelSummary = $("div.description").text().trim();