fix: guardian live page (#3549)
This commit is contained in:
parent
57d0860fd9
commit
9e8e99ffec
|
|
@ -28,7 +28,7 @@ module.exports = async (ctx) => {
|
|||
|
||||
const single = {
|
||||
title: item.title,
|
||||
description,
|
||||
description: description ? description : item.content,
|
||||
pubDate: item.pubDate,
|
||||
link: item.link,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ const ProcessFeed = (data) => {
|
|||
const $ = cheerio.load(data);
|
||||
const content = $('div.content__article-body');
|
||||
|
||||
if (content.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// remove useless DOMs
|
||||
content.find('aside, .ad-slot, .after-article, .contributions__epic, .submeta, .inline-expand-image, inline-triangle, .block-share').each((i, e) => {
|
||||
$(e).remove();
|
||||
|
|
|
|||
Loading…
Reference in New Issue