mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: 修复路由xijiayi图片显示 (#8808)
Co-authored-by: yuk7-0v0 <91721784+yuk7-0v0@users.noreply.github.com>
This commit is contained in:
+9
-1
@@ -36,8 +36,16 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
|
||||
const content = cheerio.load(detailResponse.data);
|
||||
const post = content('.post_content');
|
||||
|
||||
item.description = content('.post_content').html();
|
||||
post.find('img[data-original]').each((_, ele) => {
|
||||
ele = $(ele);
|
||||
ele.attr('src', ele.attr('data-original'));
|
||||
ele.removeAttr('class');
|
||||
ele.removeAttr('data-original');
|
||||
});
|
||||
|
||||
item.description = post.html();
|
||||
item.author = content('#author_baidu').text().replace('作者:', '');
|
||||
item.pubDate = timezone(parseDate(content('#pubtime_baidu').text()), +8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user