mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): 煎蛋打赏广告移除 (#8916)
* fix(route): 煎蛋打赏广告移除 * fix: show lazy image Continuation of https://github.com/DIYgod/RSSHub/pull/8904
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user