fix: 修复虎嗅相关网页的抓取 (#2624)

This commit is contained in:
Wade Ying 2019-07-16 11:06:11 +08:00 committed by DIYgod
parent cee08ee087
commit 806e97ad2d
1 changed files with 4 additions and 5 deletions

View File

@ -14,15 +14,14 @@ const ProcessFeed = async (list, cache) => {
const response = await got.get(link);
const $ = cheerio.load(response.data);
$('.neirong-shouquan, .neirong-shouquan-public').remove();
return {
title: $('.t-h1')
title: $('.article__title')
.text()
.trim(),
description: $('.article-img-box').html() + $('.article-content-wrap').html(),
pubDate: date($('.article-time').text(), 8),
author: $('.article-author .author-name').text(),
description: $('.article__top-img-video') + $('.article__content').html(),
pubDate: date($('.article__bottom-content__right .article__time').text(), 8),
author: $('.article__author-info-box .author-info__username').text(),
link,
};
});