mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): 修复 bilibili 动态的作者缺失 (#13197)
* feat(route): 添加 百度股市通 * fix: 修改 百度股市通 路径 * docs: 添加 百度股市通 文档 * feat: 添加 radar 支持 * fix: 按字母顺序插入新路由 * feat(route): 新增 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪 * fix: 优化 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪 的标题 * fix: 修复 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪 部分情况下的非空判断 * fix: 修复 地区名称标题的问题 * fix: 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪 的 guid 增加 pubDate * fix: 修复 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪 guid 中添加 pubDate * fix: 修改 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪 的 title * feat(route): 修复 HelloGitHub 的 月刊 路由 * fix: remove guid * feat(route): 新增 bilibili 热搜 * feat(route): 完善 bilibili热搜 的 radar * fix: 优化 bilibili热搜 list 的非空判断 * fix: 修复 bilibili热搜路由失效 fix #12632 * fix(route): 修复 bilibili热搜路由 的校验逻辑计算 * fix: 优化 bilibili/utils 的 addVerifyInfo 逻辑 * feat(route): bilibili 动态中的视频链接默认改为 BV 号并增加配置参数;修改 专栏显示全文 的参数来源 * fix(route): 修复 fulltext 来源错误;修复 addVerifyInfo 逻辑错误 * fix(route): 移除不必要的参数 * feat(route): 新增 米游社 - 同人榜 路由 * fix: 修复 崩坏二 默认排行榜类型错误;修复 art 模板路径错误 * fix: 提取 静态数据;优化入参形式 * fix(docs): 更新 bilibili 文档 * docs(docs): 修复 掘金文档错误 * fix(route): 修复 参数风格问题;修改 query 的处理 * docs(docs): 回退 last_id * fix(route): 修复 bilibili 动态的作者缺失 --------- Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
pull[bot]
parent
37404f280a
commit
308cf81859
@@ -3,7 +3,6 @@ const JSONbig = require('json-bigint');
|
||||
const utils = require('./utils');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const { fallback, queryToBoolean } = require('@/utils/readable-social');
|
||||
const querystring = require('querystring');
|
||||
const cache = require('./cache');
|
||||
|
||||
/**
|
||||
@@ -69,12 +68,14 @@ const cache = require('./cache');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const uid = ctx.params.uid;
|
||||
const routeParams = querystring.parse(ctx.params.routeParams);
|
||||
const routeParams = Object.fromEntries(new URLSearchParams(ctx.params.routeParams));
|
||||
const showEmoji = fallback(undefined, queryToBoolean(routeParams.showEmoji), false);
|
||||
const disableEmbed = fallback(undefined, queryToBoolean(routeParams.disableEmbed), false);
|
||||
const displayArticle = ctx.query.mode === 'fulltext';
|
||||
const useAvid = fallback(undefined, queryToBoolean(routeParams.useAvid), false);
|
||||
|
||||
const [author, face] = await cache.getUsernameAndFaceFromUID(ctx, uid);
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/space_history?host_uid=${uid}`,
|
||||
@@ -217,15 +218,16 @@ module.exports = async (ctx) => {
|
||||
})(),
|
||||
pubDate: item.desc?.timestamp ? parseDate(item.desc.timestamp, 'X') : null,
|
||||
link,
|
||||
author,
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${cards[0]?.desc?.user_profile?.info.uname} 的 bilibili 动态`,
|
||||
title: `${author} 的 bilibili 动态`,
|
||||
link: `https://space.bilibili.com/${uid}/dynamic`,
|
||||
description: `${cards[0]?.desc?.user_profile?.info?.uname} 的 bilibili 动态`,
|
||||
image: cards[0]?.desc?.user_profile?.info?.face,
|
||||
description: `${author} 的 bilibili 动态`,
|
||||
image: face,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user