From 3abdf26f05d4c1d19897b1a1cf8853995701fd0e Mon Sep 17 00:00:00 2001 From: xishui Date: Thu, 25 Feb 2021 05:50:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20=E6=9B=B4=E6=96=B0=E5=8C=97?= =?UTF-8?q?=E6=9E=81=E6=98=9F=E7=8E=AF=E4=BF=9D=E7=BD=91=E6=96=B0=E9=97=BB?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=BB=93=E6=9E=84=20(#7021?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 文章主题不再有#content包裹,修改为使用.newsrand选择器 --- lib/routes/bjx/huanbao.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/bjx/huanbao.js b/lib/routes/bjx/huanbao.js index 45524c0484..380fddfd2b 100644 --- a/lib/routes/bjx/huanbao.js +++ b/lib/routes/bjx/huanbao.js @@ -58,7 +58,7 @@ async function fetchPage(ctx, link) { // 将懒加载的loading图片转换为真实图片 pages.forEach(($p) => { - $p('#content') + $p('.list_detail') .find('img[data-echo]') .each((_, img) => { const $img = $p(img); @@ -68,7 +68,7 @@ async function fetchPage(ctx, link) { const item = { title: $page('.list_detail > h1').text(), - description: pages.reduce((desc, $p) => desc + $p('#content').html(), ''), + description: pages.reduce((desc, $p) => desc + $p('.list_detail .newsrand').html(), ''), pubDate: date($page('.list_detail .list_copy b').last().text()), link, author: $page('.list_detail .list_copy b').first().text(),