From 0c26c136204eb3ed6416edb678dc1ebce8a8f33e Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Tue, 9 Feb 2021 08:54:18 +0000 Subject: [PATCH] [CodeFactor] Apply fixes to commit 8086726 [ci skip] [skip ci] --- lib/routes/bilibili/followings_dynamic.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/routes/bilibili/followings_dynamic.js b/lib/routes/bilibili/followings_dynamic.js index 1caa14bc29..690bf10675 100644 --- a/lib/routes/bilibili/followings_dynamic.js +++ b/lib/routes/bilibili/followings_dynamic.js @@ -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,7 +34,7 @@ module.exports = async (ctx) => { item: data.map((item) => { const parsed = JSONbig.parse(item.card); const data = parsed.apiSeasonInfo || parsed.item || parsed; - const origin = parsed.origin ? JSONbig.parse(parsed.origin) : null + const origin = parsed.origin ? JSONbig.parse(parsed.origin) : null; // img let imgHTML = ''; @@ -112,12 +112,12 @@ module.exports = async (ctx) => { ); }); } - //作者信息 - let author = "哔哩哔哩番剧" + // 作者信息 + let author = "哔哩哔哩番剧"; if (item.desc.user_profile) { author = item.desc.user_profile.info.uname;} - + return { title: getTitle(data), author : author, @@ -126,8 +126,8 @@ module.exports = async (ctx) => { }${getIframe(data)}${getIframe(origin)}${imgHTML ? `
${imgHTML}` : ''}${videoHTML ? `
${videoHTML}` : ''}`, pubDate: new Date(item.desc.timestamp * 1000).toUTCString(), link: link, - - + + }; }), };