From ece50722c0680f371b6dcc8716db2215ada7b4fe Mon Sep 17 00:00:00 2001 From: simoin Date: Mon, 22 Jun 2020 11:39:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20/jdlingyu=20DOM=20=E6=9B=B4=E6=96=B0=20(?= =?UTF-8?q?#5020)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/jdlingyu/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/jdlingyu/index.js b/lib/routes/jdlingyu/index.js index c108e335db..dc5460820d 100644 --- a/lib/routes/jdlingyu/index.js +++ b/lib/routes/jdlingyu/index.js @@ -17,15 +17,15 @@ module.exports = async (ctx) => { const $ = cheerio.load(response.data); const items = await Promise.all( - $('#main > div.grid-bor > div') + $('#post-list > ul.b2_gap > li') .get() .map(async (div) => { - const a = $(div).find('.entry-title > a'); + const a = $(div).find('.post-info > h2 > a'); const link = a.attr('href'); const description = await ctx.cache.tryGet(link, async () => { const response = await got.get(link); const $ = cheerio.load(response.data); - return $('#content-innerText > p').html(); + return $('.entry-content > p').html(); }); return Promise.resolve({ title: a.text(),