From 8059ca76d86a44cec9216630d333b46996866ae6 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 23 Dec 2023 19:44:54 +0000 Subject: [PATCH] fix(route): dcfever (#14106) --- lib/v2/dcfever/utils.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/v2/dcfever/utils.js b/lib/v2/dcfever/utils.js index 489d179bc..010a0ca2a 100644 --- a/lib/v2/dcfever/utils.js +++ b/lib/v2/dcfever/utils.js @@ -10,7 +10,7 @@ const parseItem = (item, tryGet) => tryGet(item.link, async () => { const { data: response } = await got(item.link); const $ = cheerio.load(response); - const content = $('div[itemprop="articleBody"]'); + const content = $('div[itemprop="articleBody"], .column_article_content_html'); const pageLinks = $('.article_multi_page a') .not('.selected') @@ -41,6 +41,13 @@ const parseItem = (item, tryGet) => } }); + content.find('iframe').each((_, e) => { + e = $(e); + if (e.attr('src').startsWith('https://www.facebook.com/plugins/like.php')) { + e.remove(); + } + }); + item.description = content.html(); item.pubDate = parseDate($('meta[property="article:published_time"]').attr('content'));