From fc66b8a85d7ce813e2c3380be587926805f45df1 Mon Sep 17 00:00:00 2001 From: Ethan Shen Date: Mon, 21 Sep 2020 03:59:33 +0800 Subject: [PATCH] fix: update links to dytt (#5562) --- lib/routes/dytt/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/dytt/index.js b/lib/routes/dytt/index.js index 43e284899..8266c0619 100644 --- a/lib/routes/dytt/index.js +++ b/lib/routes/dytt/index.js @@ -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 {