fix: simplify huxiu article (#4583)

This commit is contained in:
hoilc 2020-04-28 11:54:49 +08:00 committed by GitHub
parent ac7fe84e91
commit 13757932af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,13 @@ const ProcessFeed = async (list, cache) => {
.find('.text-big-title')
.each((i, e) => (e.tagName = 'h3'));
$('p').each(function () {
if ($(this).find('img').length === 0 && $(this).text().match(/^\s*$/)) {
$(this).remove();
}
});
$('img.dialog_add_wxxy_qrcode_icon').remove();
return {
title: $('.article__title').text().trim(),
description: $('.article__top-img-video') + $('.article__content').html(),