WuxiaWorldSite: Fix novelUrl
This commit is contained in:
@@ -18,8 +18,9 @@ const novelsScraper = async (req, res) => {
|
|||||||
const novelName = $(el).find("a").attr("title");
|
const novelName = $(el).find("a").attr("title");
|
||||||
const novelCover = baseUrl + $(el).find("a > img").attr("src");
|
const novelCover = baseUrl + $(el).find("a > img").attr("src");
|
||||||
|
|
||||||
let novelUrl = $(el).find(".name_views > a").attr("href").slice(1);
|
let novelUrl = $(el).find(".name_views > a").attr("href");
|
||||||
novelUrl += "/";
|
novelId = novelUrl.split("/");
|
||||||
|
novelUrl = novelId[2] + "/";
|
||||||
|
|
||||||
const novel = {
|
const novel = {
|
||||||
extensionId: 12,
|
extensionId: 12,
|
||||||
@@ -179,8 +180,9 @@ const searchScraper = async (req, res) => {
|
|||||||
$(".a_item").each((i, el) => {
|
$(".a_item").each((i, el) => {
|
||||||
const novelName = $(el).find(".name_views > a").attr("title");
|
const novelName = $(el).find(".name_views > a").attr("title");
|
||||||
const novelCover = baseUrl + $(el).find("a > img").attr("src");
|
const novelCover = baseUrl + $(el).find("a > img").attr("src");
|
||||||
let novelUrl = $(el).find(".name_views > a").attr("href").slice(1);
|
let novelUrl = $(el).find(".name_views > a").attr("href");
|
||||||
novelUrl += "/";
|
novelId = novelUrl.split("/");
|
||||||
|
novelUrl = novelId[2] + "/";
|
||||||
|
|
||||||
const novel = {
|
const novel = {
|
||||||
extensionId: 12,
|
extensionId: 12,
|
||||||
|
|||||||
Reference in New Issue
Block a user