mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: 修复漫画DB的ctx.state.data内link不正确 (#2112)
This commit is contained in:
@@ -4,9 +4,10 @@ const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
const comicPage = host + `/manhua/${id}`;
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: host + `/manhua/${id}`,
|
||||
url: comicPage,
|
||||
});
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
@@ -14,7 +15,7 @@ module.exports = async (ctx) => {
|
||||
const comicTitle = $('.comic-title').text();
|
||||
ctx.state.data = {
|
||||
title: '漫画DB - ' + comicTitle,
|
||||
link: host,
|
||||
link: comicPage,
|
||||
description: '漫画DB',
|
||||
item: list
|
||||
.map((i, item) => ({
|
||||
|
||||
Reference in New Issue
Block a user