fix(route): agefans domain (#7640)

This commit is contained in:
Colerar
2021-08-12 00:44:11 -07:00
committed by GitHub
parent 7d987b0a07
commit 8b69380e3e
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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,
};
+1 -1
View File
@@ -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',