mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-13 00:35:57 +08:00
fix: douban people status (#2989)
This commit is contained in:
@@ -12,11 +12,18 @@ function getContentByActivity(status) {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case '转发':
|
case '转发':
|
||||||
description = getContentByActivity(status.reshared_status).title;
|
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}`;
|
title = `${status.author.name} ${status.activity} ${status.reshared_status.author.name} 的广播:${status.reshared_status.text}`;
|
||||||
status.reshared_status.images.forEach((image) => {
|
status.reshared_status.images.forEach((image) => {
|
||||||
description += `<p><img src="${image.normal.url}"/></p>`;
|
description += `<p><img src="${image.normal.url}"/></p>`;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (status.card) {
|
if (status.card) {
|
||||||
@@ -44,12 +51,15 @@ module.exports = async (ctx) => {
|
|||||||
Referer: `https://m.douban.com/people/${userid}/statuses`,
|
Referer: `https://m.douban.com/people/${userid}/statuses`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const items = response.data.items;
|
const items = response.data.items;
|
||||||
|
|
||||||
ctx.state.data = {
|
ctx.state.data = {
|
||||||
title: `豆瓣广播-${userid}`,
|
title: `豆瓣广播-${userid}`,
|
||||||
link: `https://m.douban.com/people/${userid}/statuses`,
|
link: `https://m.douban.com/people/${userid}/statuses`,
|
||||||
item: items.map((item) => {
|
item: items
|
||||||
|
.filter((item) => !item.deleted)
|
||||||
|
.map((item) => {
|
||||||
const r = getContentByActivity(item.status);
|
const r = getContentByActivity(item.status);
|
||||||
return {
|
return {
|
||||||
title: r.title,
|
title: r.title,
|
||||||
|
|||||||
Reference in New Issue
Block a user