mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 23:34:38 +08:00
fix: douban people status (#2989)
This commit is contained in:
@@ -12,11 +12,18 @@ function getContentByActivity(status) {
|
||||
});
|
||||
break;
|
||||
case '转发':
|
||||
description = getContentByActivity(status.reshared_status).title;
|
||||
title = `${status.author.name} ${status.activity} ${status.reshared_status.author.name} 的广播:${status.reshared_status.text}`;
|
||||
status.reshared_status.images.forEach((image) => {
|
||||
description += `<p><img src="${image.normal.url}"/></p>`;
|
||||
});
|
||||
description = `${status.text}<br>`;
|
||||
if (status.reshared_status.deleted) {
|
||||
title = `${status.author.name} ${status.activity} 广播:原动态已被发布者删除`;
|
||||
description += `原动态已被发布者删除`;
|
||||
} else {
|
||||
description += getContentByActivity(status.reshared_status).title;
|
||||
title = `${status.author.name} ${status.activity} ${status.reshared_status.author.name} 的广播:${status.reshared_status.text}`;
|
||||
status.reshared_status.images.forEach((image) => {
|
||||
description += `<p><img src="${image.normal.url}"/></p>`;
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
if (status.card) {
|
||||
@@ -44,19 +51,22 @@ module.exports = async (ctx) => {
|
||||
Referer: `https://m.douban.com/people/${userid}/statuses`,
|
||||
},
|
||||
});
|
||||
|
||||
const items = response.data.items;
|
||||
|
||||
ctx.state.data = {
|
||||
title: `豆瓣广播-${userid}`,
|
||||
link: `https://m.douban.com/people/${userid}/statuses`,
|
||||
item: items.map((item) => {
|
||||
const r = getContentByActivity(item.status);
|
||||
return {
|
||||
title: r.title,
|
||||
link: item.status.sharing_url,
|
||||
pubDate: item.status.create_time,
|
||||
description: r.description,
|
||||
};
|
||||
}),
|
||||
item: items
|
||||
.filter((item) => !item.deleted)
|
||||
.map((item) => {
|
||||
const r = getContentByActivity(item.status);
|
||||
return {
|
||||
title: r.title,
|
||||
link: item.status.sharing_url,
|
||||
pubDate: item.status.create_time,
|
||||
description: r.description,
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user