fix(route): agefans domain (#7640)
This commit is contained in:
parent
7d987b0a07
commit
8b69380e3e
|
|
@ -4,7 +4,7 @@ const cheerio = require('cheerio');
|
|||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://www.agefans.tv/detail/${ctx.params.id}`,
|
||||
url: `https://www.agefans.cc/detail/${ctx.params.id}`,
|
||||
});
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
|
|
@ -15,14 +15,14 @@ module.exports = async (ctx) => {
|
|||
.map((idx, item) => ({
|
||||
title: $(item).text(),
|
||||
description: $(item).text(),
|
||||
link: `https://www.agefans.tv${$(item).attr('href')}`,
|
||||
link: `https://www.agefans.cc${$(item).attr('href')}`,
|
||||
}))
|
||||
.get();
|
||||
items.reverse();
|
||||
|
||||
ctx.state.data = {
|
||||
title: `AGE动漫 - ${$('.detail_imform_name').text()}`,
|
||||
link: `https://www.agefans.tv/detail/${ctx.params.id}`,
|
||||
link: `https://www.agefans.cc/detail/${ctx.params.id}`,
|
||||
description: $('.detail_imform_desc_pre').text(),
|
||||
item: items,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ const got = require('@/utils/got');
|
|||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://www.agefans.net';
|
||||
const rootUrl = 'https://www.agefans.cc';
|
||||
const currentUrl = `${rootUrl}/update`;
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
|
|
|
|||
Loading…
Reference in New Issue