From 6312b28f08cc8fc657b2a800c8617a59d31a2d0c Mon Sep 17 00:00:00 2001 From: Queensferry Date: Sat, 17 Oct 2020 18:41:18 -0700 Subject: [PATCH] fix: mofcom css selector changed (#5879) (#5883) --- lib/routes/mofcom/article.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/mofcom/article.js b/lib/routes/mofcom/article.js index fd98f6de1..b2395fc7d 100644 --- a/lib/routes/mofcom/article.js +++ b/lib/routes/mofcom/article.js @@ -10,7 +10,7 @@ module.exports = async (ctx) => { const res = await got.get(url); const $ = cheerio.load(res.data); const title = $('head > title').text(); - const list = $('.u-newsList01.f-mt10 li').get(); + const list = $('.txtList_01 li').get(); const out = await Promise.all( list.map(async (item) => { @@ -40,7 +40,7 @@ module.exports = async (ctx) => { const single = { title, link: itemUrl, - description: $d('.artCon').html() || $d('.textlive').html(), + description: $d('.art-con').html() || $d('.textlive').html(), }; ctx.cache.set(itemUrl, JSON.stringify(single)); return Promise.resolve(single);