fix: update links to dytt (#5562)
This commit is contained in:
parent
b7b527df2b
commit
fc66b8a85d
|
|
@ -1,7 +1,7 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const iconv = require('iconv-lite');
|
||||
const baseURL = 'https://www.ygdy8.net';
|
||||
const baseURL = 'https://www.ygdy8.net/index.html';
|
||||
async function load(link, ctx) {
|
||||
const cache = await ctx.cache.get(link);
|
||||
if (cache) {
|
||||
|
|
@ -33,9 +33,9 @@ module.exports = async (ctx) => {
|
|||
list.splice(0, 1);
|
||||
// const list = $('.co_content8 table tr:not(:first-child)').get();
|
||||
const process = await Promise.all(
|
||||
list.map(async (item) => {
|
||||
list.slice(0, 20).map(async (item) => {
|
||||
const link = $(item).find('a:nth-of-type(2)');
|
||||
const itemUrl = baseURL + link.attr('href');
|
||||
const itemUrl = 'https://www.ygdy8.net' + link.attr('href');
|
||||
const other = await load(itemUrl, ctx);
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue