mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-29 18:06:31 +08:00
fix(route): 修复 bilibili 动态无法获取问题 (#7961)
This commit is contained in:
@@ -82,7 +82,7 @@ module.exports = async (ctx) => {
|
||||
link: `https://space.bilibili.com/${uid}/dynamic`,
|
||||
description: `${data[0].desc.user_profile.info.uname} 的 bilibili 动态`,
|
||||
item: data.map((item) => {
|
||||
const getTitle = (data) => data.title || data.description || data.content || (data.vest && data.vest.content) || '';
|
||||
const getTitle = (data) => (data ? data.title || data.description || data.content || (data.vest && data.vest.content) || '' : '');
|
||||
const getDes = (data) =>
|
||||
data.dynamic || data.desc || data.description || data.content || data.summary || (data.vest && data.vest.content) + (data.sketch && `<br>${data.sketch.title}<br>${data.sketch.desc_text}`) || data.intro || '';
|
||||
const getOriginDes = (data) => (data && (data.apiSeasonInfo && data.apiSeasonInfo.title && `//转发自: ${data.apiSeasonInfo.title}`) + (data.index_title && `<br>${data.index_title}`)) || '';
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = async (ctx) => {
|
||||
link: `https://t.bilibili.com`,
|
||||
description: `${name} 关注的动态`,
|
||||
item: data.map((item) => {
|
||||
const getTitle = (data) => data.title || data.description || data.content || (data.vest && data.vest.content) || '';
|
||||
const getTitle = (data) => (data ? data.title || data.description || data.content || (data.vest && data.vest.content) || '' : '');
|
||||
const getDes = (data) =>
|
||||
data.dynamic || data.desc || data.description || data.content || data.summary || (data.vest && data.vest.content) + (data.sketch && `<br>${data.sketch.title}<br>${data.sketch.desc_text}`) || data.intro || '';
|
||||
const getOriginDes = (data) => (data && (data.apiSeasonInfo && data.apiSeasonInfo.title && `//转发自: ${data.apiSeasonInfo.title}`) + (data.index_title && `<br>${data.index_title}`)) || '';
|
||||
@@ -41,7 +41,7 @@ module.exports = async (ctx) => {
|
||||
const getIframe = (data) => (!disableEmbed && data && data.aid ? `<br><br>${utils.iframe(data.aid)}<br>` : '');
|
||||
|
||||
const parsed = JSONbig.parse(item.card);
|
||||
const data = parsed.apiSeasonInfo || getTitle(parsed.item) ? parsed.item : parsed;
|
||||
const data = parsed.apiSeasonInfo || (getTitle(parsed.item) ? parsed.item : parsed);
|
||||
const origin = parsed.origin ? JSONbig.parse(parsed.origin) : null;
|
||||
|
||||
// img
|
||||
|
||||
Reference in New Issue
Block a user