From 45cfbebb523bc43cf7889cfeae96507dcbe2b92c Mon Sep 17 00:00:00 2001 From: Cloud Date: Thu, 6 Jun 2019 11:54:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dcnbeta=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=8F=90=E5=8F=96=E4=B8=8D=E5=AE=8C=E6=95=B4bug=20(#2?= =?UTF-8?q?334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复cnbeta内容提取不完整bug * Update utils.js * Update utils.js --- lib/routes/cnbeta/utils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/routes/cnbeta/utils.js b/lib/routes/cnbeta/utils.js index 39c1321d65..3b30efd42f 100644 --- a/lib/routes/cnbeta/utils.js +++ b/lib/routes/cnbeta/utils.js @@ -30,9 +30,12 @@ async function load(link) { }); // 提取内容 - const description = $('.article-content').html(); + const description = $('.article-summary p').html() + '
' + $('.article-content').html(); - return { description, pubDate }; + // 稿源 + const author = $('.source a span').text(); + + return { description, pubDate, author }; } const ProcessFeed = async (list, caches) => {