mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
[CodeFactor] Apply fixes
[ci skip] [skip ci]
This commit is contained in:
@@ -8,7 +8,7 @@ module.exports = async (ctx) => {
|
||||
const uid = String(ctx.params.uid);
|
||||
const disableEmbed = ctx.params.disableEmbed;
|
||||
const name = await cache.getUsernameFromUID(ctx, uid);
|
||||
|
||||
|
||||
const cookie = config.bilibili.cookies[uid];
|
||||
if (cookie === undefined) {
|
||||
throw Error('缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值');
|
||||
@@ -34,9 +34,9 @@ module.exports = async (ctx) => {
|
||||
item: data.map((item) => {
|
||||
const parsed = JSONbig.parse(item.card);
|
||||
const data = parsed.item || parsed;
|
||||
const origin = parsed.origin ? JSONbig.parse(parsed.origin) : null
|
||||
|
||||
//番剧标题
|
||||
const origin = parsed.origin ? JSONbig.parse(parsed.origin) : null;
|
||||
|
||||
// 番剧标题
|
||||
const bangumi_title = parsed.apiSeasonInfo || parsed;
|
||||
|
||||
// img
|
||||
@@ -106,7 +106,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
// emoji
|
||||
let data_content = getDes(data);
|
||||
if (item.display){} else if (item.display.emoji_info) {
|
||||
if (item.display) {} else if (item.display.emoji_info) {
|
||||
const emoji = item.display.emoji_info.emoji_details;
|
||||
emoji.forEach(function (item) {
|
||||
data_content = data_content.replace(
|
||||
@@ -115,12 +115,12 @@ module.exports = async (ctx) => {
|
||||
);
|
||||
});
|
||||
}
|
||||
//作者信息
|
||||
// 作者信息
|
||||
if (!item.desc.user_profile) {
|
||||
var author = "哔哩哔哩番剧";
|
||||
} else {author = item.desc.user_profile.info.uname;}
|
||||
|
||||
|
||||
|
||||
return {
|
||||
title: getTitle(data),
|
||||
author : author,
|
||||
@@ -129,8 +129,8 @@ module.exports = async (ctx) => {
|
||||
}${getIframe(data)}${getIframe(origin)}${imgHTML ? `<br>${imgHTML}` : ''}${videoHTML ? `<br>${videoHTML}` : ''}`,
|
||||
pubDate: new Date(item.desc.timestamp * 1000).toUTCString(),
|
||||
link: link,
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user