fix(route): 煎蛋打赏广告移除 (#8916)

* fix(route): 煎蛋打赏广告移除

* fix: show lazy image

Continuation of https://github.com/DIYgod/RSSHub/pull/8904
This commit is contained in:
Ethan Shen
2022-02-02 20:35:22 +08:00
committed by GitHub
parent 5ddefa7ebd
commit 322089d762
+6 -1
View File
@@ -28,7 +28,10 @@ module.exports = async (ctx) => {
link: a.attr('href'),
description: art(path.join(__dirname, 'templates/description.art'), {
summary: item.find('.indexs').text(),
image: item.find('img').attr('src'),
image: item
.find('img')
.attr('data-original')
.replace(/!square/, ''),
}),
};
});
@@ -43,6 +46,8 @@ module.exports = async (ctx) => {
const content = cheerio.load(detailResponse.data);
content('.wechat-hide').prev().nextAll().remove();
item.description += content('.entry').html();
item.author = content('.postinfo strong').text();
item.pubDate = timezone(parseDate(detailResponse.data.match(/"pubDate": "(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})"/)[1]), +8);