WuxiaWorldSite: fix novelUrl
This commit is contained in:
@@ -14,10 +14,12 @@ const novelsScraper = async (req, res) => {
|
|||||||
|
|
||||||
let novels = [];
|
let novels = [];
|
||||||
|
|
||||||
$(".a_item").each( (i, el) => {
|
$(".a_item").each((i, el) => {
|
||||||
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");
|
||||||
const novelUrl = $(el).find(".name_views > a").attr("href");
|
|
||||||
|
let novelUrl = $(el).find(".name_views > a").attr("href").slice(1);
|
||||||
|
novelUrl += "/";
|
||||||
|
|
||||||
const novel = {
|
const novel = {
|
||||||
extensionId: 12,
|
extensionId: 12,
|
||||||
@@ -30,7 +32,7 @@ const novelsScraper = async (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
res.json(novels);
|
res.json(novels);
|
||||||
}
|
};
|
||||||
|
|
||||||
const novelScraper = async (req, res) => {
|
const novelScraper = async (req, res) => {
|
||||||
const novelUrl = req.params.novelUrl;
|
const novelUrl = req.params.novelUrl;
|
||||||
@@ -146,7 +148,6 @@ const chapterScraper = async (req, res) => {
|
|||||||
? $(".next_sesction > a").attr("href").split("/").pop()
|
? $(".next_sesction > a").attr("href").split("/").pop()
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|
||||||
novelUrl += "/";
|
novelUrl += "/";
|
||||||
chapterUrl += "/";
|
chapterUrl += "/";
|
||||||
|
|
||||||
@@ -175,10 +176,11 @@ const searchScraper = async (req, res) => {
|
|||||||
|
|
||||||
let novels = [];
|
let novels = [];
|
||||||
|
|
||||||
$(".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");
|
||||||
const novelUrl = $(el).find(".name_views > a").attr("href");
|
let novelUrl = $(el).find(".name_views > a").attr("href").slice(1);
|
||||||
|
novelUrl += "/";
|
||||||
|
|
||||||
const novel = {
|
const novel = {
|
||||||
extensionId: 12,
|
extensionId: 12,
|
||||||
@@ -190,10 +192,9 @@ const searchScraper = async (req, res) => {
|
|||||||
novels.push(novel);
|
novels.push(novel);
|
||||||
});
|
});
|
||||||
|
|
||||||
res.json(novels)
|
res.json(novels);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
module.exports = WuxiaWorldSiteScraper = {
|
module.exports = WuxiaWorldSiteScraper = {
|
||||||
novelsScraper,
|
novelsScraper,
|
||||||
novelScraper,
|
novelScraper,
|
||||||
|
|||||||
Reference in New Issue
Block a user