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

是否无法支持短房号? #19

Closed
Nauxscript opened this issue Jan 16, 2023 · 4 comments
Closed

是否无法支持短房号? #19

Nauxscript opened this issue Jan 16, 2023 · 4 comments

Comments

@Nauxscript
Copy link
Contributor

发现有些房间的房间号是比较短的,房号只有 3、4 位(好像是排行榜靠前的或者一些比较火的主播会有这样的房间号),通过这种短的房号无法抓到弹幕;不知道是什么原因呢?有点疑惑;有没有一些解决方法?

@ddiu8081
Copy link
Owner

ddiu8081 commented Jan 16, 2023

短房间号需要转为长房间号传进去,可自己调用 api 获取 (#15),room_id 即为长房号。

有计划把这部分在内部直接处理了,不过浏览器端还会有跨域问题,所以暂时还是自己转一下吧。

@Nauxscript
Copy link
Contributor Author

原来如此,明白了,十分感谢;
还有个小问题,目前没有发现哪里可以获取主播名字,我只在那个 User 类型中的 badge 信息中看到有个主播名,不过感觉如果从这里获取有点奇怪;是否需要用其他接口来获取呢?或者有其他地方可以获取?

#15 的接口数据中貌似也没有这个数据。

@ddiu8081
Copy link
Owner

ddiu8081 commented Jan 16, 2023

看起来这个接口只能获取到主播 uid,需要从其他接口取名字。SocialSisterYi/bilibili-API-collect 项目里有 api 的合集,获取主播名字可用 https://api.bilibili.com/x/space/acc/info?mid=[uid]

@Nauxscript
Copy link
Contributor Author

好的,十分感谢!

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

No branches or pull requests

2 participants