fix: deepscan errors again
This commit is contained in:
parent
c767e6c7b8
commit
1c52cec40a
|
|
@ -11,7 +11,7 @@ module.exports = async (ctx) => {
|
|||
url: `https://www.bilibili.com/bangumi/media/md${mediaid}`,
|
||||
});
|
||||
mediaData = JSON.parse(response.data.match(/window\.__INITIAL_STATE__=([\s\S]+);\(function\(\)/)[1]) || {};
|
||||
seasonid = mediaData.mediaInfo.season_id;
|
||||
seasonid = mediaData?.mediaInfo.season_id;
|
||||
}
|
||||
const { data } = await got.get(`https://api.bilibili.com/pgc/web/season/section?season_id=${seasonid}`);
|
||||
|
||||
|
|
@ -42,9 +42,9 @@ module.exports = async (ctx) => {
|
|||
|
||||
ctx.state.data = {
|
||||
title: mediaData?.mediaInfo.title,
|
||||
link: `https://www.bilibili.com/bangumi/media/md${mediaData.mediaInfo.media_id}/`,
|
||||
image: mediaData.mediaInfo.cover,
|
||||
description: mediaData.mediaInfo.evaluate,
|
||||
link: `https://www.bilibili.com/bangumi/media/md${mediaData?.mediaInfo.media_id}/`,
|
||||
image: mediaData?.mediaInfo.cover,
|
||||
description: mediaData?.mediaInfo.evaluate,
|
||||
item: episodes,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ module.exports = async (ctx) => {
|
|||
const videoHTMLSource = videoHTML ? `<br>${videoHTML}` : '';
|
||||
return `${description}${originName}<br>${getUrl(data)}${getUrl(origin)}${getIframe(data)}${getIframe(origin)}${imgHTMLSource}${videoHTMLSource}`;
|
||||
})(),
|
||||
pubDate: item.desc ? (item.desc.timestamp ? parseDate(item.desc.timestamp, 'X') : null) : null,
|
||||
pubDate: item.desc?.timestamp ? parseDate(item.desc.timestamp, 'X') : null,
|
||||
link,
|
||||
};
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ module.exports = async (ctx) => {
|
|||
|
||||
return `${description}${originName}${getIframe(data)}${getIframe(origin)}${imgHTMLSource}${videoHTMLSource}`;
|
||||
})(),
|
||||
pubDate: new Date(item.desc.timestamp * 1000).toUTCString(),
|
||||
pubDate: new Date(item.desc?.timestamp * 1000).toUTCString(),
|
||||
link,
|
||||
};
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ module.exports = async (ctx) => {
|
|||
let mediaTag = '';
|
||||
if (showMediaTagInTitle) {
|
||||
msgTypes.forEach((type) => {
|
||||
if (type !== REPLY || type !== VIA_BOT || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) {
|
||||
if (type !== REPLY || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) {
|
||||
mediaTag += showMediaTagAsEmoji ? mediaTagDict[type][1] : mediaTagDict[type][0];
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue