From 68353530522cb68d16c320abf71d321dfbd52d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E5=B9=B3=E7=94=9F?= Date: Mon, 4 Apr 2022 23:26:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(route)(fortunechina):=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E8=B4=A2=E5=AF=8C=E4=B8=AD=E6=96=87=E7=BD=91=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8C=B9=E9=85=8D=E8=A7=84=E5=88=99=E3=80=81?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=80=E4=BA=9B=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=85=83=E7=B4=A0=20(#9464)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/v2/fortunechina/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/v2/fortunechina/index.js b/lib/v2/fortunechina/index.js index d7e1f6a0f..38577c1b0 100644 --- a/lib/v2/fortunechina/index.js +++ b/lib/v2/fortunechina/index.js @@ -41,9 +41,9 @@ module.exports = async (ctx) => { const content = cheerio.load(detailResponse.data); const spans = content('.mod-info span').text(); - let matches = spans.match(/(\d{4}年\d{2}月\d{2}日)/); + let matches = spans.match(/(\d{4}-\d{2}-\d{2})/); if (matches) { - item.pubDate = parseDate(matches[1].replace(/年|月/g, '-').replace(/日/, '')); + item.pubDate = parseDate(matches[1]); } else { matches = spans.match(/(\d+小时前)/); if (matches) { @@ -53,7 +53,7 @@ module.exports = async (ctx) => { item.author = content('.name').text(); - content('.mod-info, .title').remove(); + content('.mod-info, .title, .eval-zan, .eval-pic, .sae-more').remove(); item.description = content('#articleContent, .eval-desc').html();