fix: update links to dytt (#5562)

This commit is contained in:
Ethan Shen 2020-09-21 03:59:33 +08:00 committed by GitHub
parent b7b527df2b
commit fc66b8a85d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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 {