From aea598550ebbb9d18fd7357fcd8c24e8ec04a24f Mon Sep 17 00:00:00 2001 From: Laam Pui Date: Mon, 14 Dec 2020 20:10:31 +0800 Subject: [PATCH] fix: /paidai/news issue (#6443) --- lib/routes/paidai/news.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/paidai/news.js b/lib/routes/paidai/news.js index 1a2af4d1c9..3260507477 100644 --- a/lib/routes/paidai/news.js +++ b/lib/routes/paidai/news.js @@ -2,7 +2,7 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const utils = require('./utils'); -const host = 'http://news.paidai.com/'; +const host = 'http://www.paidai.com/'; module.exports = async (ctx) => { const link = host; @@ -14,13 +14,13 @@ module.exports = async (ctx) => { const $ = cheerio.load(response.data); - const list = $('.news_list ul.list>li') + const list = $('#topic_list ul li.topic') .slice(0, 11) .map(function () { const info = { - title: $(this).find('h3 a').attr('title'), - link: $(this).find('h3').find('a').attr('href'), - date: $(this).find('.post_info').text(), + title: $('.li_1 a.i_title', this).attr('title'), + link: $('.li_1 a.i_title', this).attr('href'), + date: $('.li_2 .li_s', this).text(), }; return info; })