Skip to content

Commit

Permalink
fix(route): dcfever (#14106)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyRL authored Dec 23, 2023
1 parent 9a32aea commit 8059ca7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/v2/dcfever/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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'));

Expand Down

0 comments on commit 8059ca7

Please sign in to comment.