Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 迁移 bilibili 用户信息获取接口到可用版本 #1131

Merged
merged 4 commits into from
Mar 29, 2024

Conversation

wuhao-igno
Copy link
Contributor

目前版本使用的两个 bilibili 的 open api (api.bilibili.com/x/space/acc/info, api.bilibili.com/x/space/arc/search)无法正常使用,替换为使用 api.bilibili.com/x/space/wbi/acc/infohttps://api.bilibili.com/x/space/wbi/arc/search 接口。

该接口需要使用 wbi 验证,参考 文档 增加相应逻辑,因此引入了外部依赖 md5

目前存在问题:bilibili.bi_artist 执行结束后,调用 success 中传入的回调无法正确使页面更新结束 loading 状态;重新返回再进入后,由于命中缓存所以能够避免 loading 状态直接同步设置数据,由于对 ng 不太熟悉,暂时无法排查出问题在哪儿。

待优化项:目前 wbi 验证需要用户处于登录态才能跑通,同样由于对 ng 和 UI 逻辑不太熟悉,不太清楚应该如何加上未登录时的报错提醒。

@wuhao-igno
Copy link
Contributor Author

getPlaylist 中的回调执行中手动执行了下脏检查,使得在 bilibili.bi_artist 执行结束后能正确更新 UI

@scientificworld scientificworld mentioned this pull request Oct 22, 2023
4 tasks
@listen1
Copy link
Owner

listen1 commented Dec 17, 2023

抱歉review拖了很久,很好的改进。只有一个关于md5的部分可能需要稍微修改一下。

项目里已经使用了forge作为md5算法的提供,可以参考

    const digest = forge.md5
      .create()
      .update(forge.util.encodeUtf8(message))
      .digest()
      .toHex();

所以可否把md5相关的部分更新一下?

@wuhao-igno
Copy link
Contributor Author

抱歉review拖了很久,很好的改进。只有一个关于md5的部分可能需要稍微修改一下。

项目里已经使用了forge作为md5算法的提供,可以参考

    const digest = forge.md5
      .create()
      .update(forge.util.encodeUtf8(message))
      .digest()
      .toHex();

所以可否把md5相关的部分更新一下?

更新了;话说麻烦能给 bilibili 的作者页的加个分页功能吗,我不太熟悉 ng,UI 不太会改...

@listen1 listen1 merged commit 29ea74a into listen1:master Mar 29, 2024
1 check passed
@listen1
Copy link
Owner

listen1 commented Mar 29, 2024

已合并,但好像测试过程中仍然无法显示artist页面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants