mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat: support douban status video_card
This commit is contained in:
@@ -26,9 +26,10 @@ function getContentByActivity(status) {
|
||||
|
||||
break;
|
||||
default:
|
||||
description = `${status.text ? `${status.text}<br><br>` : ''}`;
|
||||
title = `${status.author.name}${status.activity}: ${description}`;
|
||||
if (status.card) {
|
||||
let image;
|
||||
description = `${status.text ? `${status.text}<br><br>` : ''}`;
|
||||
if (status.card.image && (status.card.image.large || status.card.image.normal)) {
|
||||
image = (status.card.image.large || status.card.image.normal).url;
|
||||
}
|
||||
@@ -40,6 +41,14 @@ function getContentByActivity(status) {
|
||||
title = `${status.author.name} ${status.activity}:「${status.card.title}」${status.text}`;
|
||||
}
|
||||
}
|
||||
if (status.video_card) {
|
||||
const videoCover = status.video_card.video_info && status.video_card.video_info.cover_url;
|
||||
const videoSrc = status.video_card.video_info && status.video_card.video_info.video_url;
|
||||
description += `${videoSrc ? `<br><video src="${videoSrc}" ${videoCover ? `poster="${videoCover}"` : ''}></video>` : ''}<br><br>${
|
||||
status.video_card.title ? `<a href="${status.video_card.url}">${status.video_card.title}</a>` : ''
|
||||
}`;
|
||||
title = `${status.author.name}${status.activity}:《${status.video_card.title}》`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return { title, description };
|
||||
|
||||
Reference in New Issue
Block a user