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

Json数据部分不可见 #4

Closed
Are-sky opened this issue Jul 11, 2023 · 10 comments
Closed

Json数据部分不可见 #4

Are-sky opened this issue Jul 11, 2023 · 10 comments
Labels
bug Something isn't working feature provide new features

Comments

@Are-sky
Copy link
Contributor

Are-sky commented Jul 11, 2023

在按样例中运行后,DanmukuEvent的Json数据中user字段为
"user":{"uid":0,"uname":"故***","face":null}
这是否正常?
以下是完整的控制台打印:
{ "cmd": "DanmakuEvent", "data": { "flag": 0, "message": { "tag": "Plain", "data": { "message": "要破产啦(" } }, "user": { "uid": 0, "uname": "弦***", "face": null }, "fans_medal": { "anchor_roomid": 22389206, "guard_level": 0, "medal_level": 3, "medal_name": "自麂人" } }, "timestamp": 1689085901635 }

@4t145
Copy link
Owner

4t145 commented Jul 13, 2023

你指的数据不可见是指uid为0和名字有码吗?还是指face字段为null?

  1. 如果是前者,这个问题我没有碰见过,那可能是b站反制野生接口的措施?
  2. 如果是后者,弹幕消息的用户的确是不带头像的

@Are-sky
Copy link
Contributor Author

Are-sky commented Jul 13, 2023

前者,在开始接收弹幕时user字段数据都是有正确数据的,但当过一定时间后,user字段就会变成"user":{"uid":0,"uname":"故***","face":null}这样的数据

@4t145
Copy link
Owner

4t145 commented Jul 13, 2023

前者,在开始接收弹幕时user字段数据都是有正确数据的,但当过一定时间后,user字段就会变成"user":{"uid":0,"uname":"故***","face":null}这样的数据

那可能是没登陆不让看了...

@4t145
Copy link
Owner

4t145 commented Jul 13, 2023

参考这个issue: SocialSisterYi/bilibili-API-collect#732
计划解决方法

@4t145 4t145 added bug Something isn't working feature provide new features labels Jul 13, 2023
4t145 added a commit that referenced this issue Jul 13, 2023
@Are-sky
Copy link
Contributor Author

Are-sky commented Jul 13, 2023

ok 我知道怎么解决了

@Are-sky
Copy link
Contributor Author

Are-sky commented Jul 13, 2023

对Connector,RoomPlayInfoData增加uid字段,然后修改Connector::init方法和Connector::connect两个方法就解决了

@Are-sky Are-sky closed this as completed Jul 13, 2023
@4t145
Copy link
Owner

4t145 commented Jul 14, 2023

对Connector,RoomPlayInfoData增加uid字段,然后修改Connector::init方法和Connector::connect两个方法就解决了

直接在auth包里带上主播uid似乎也可以,看这个提交6ed6d97
其它项目的issue xfgryujk/blivedm#29

@4t145
Copy link
Owner

4t145 commented Jul 14, 2023

你是在使用这个库吗,我计划周末规范下内部错误处理,把网络请求客户端迁移回reqwest然后发个包

@Are-sky
Copy link
Contributor Author

Are-sky commented Jul 14, 2023

是的 我fork了一份 用来当我https://github.com/Are-sky/Stargazing这个B站直播监听项目的第三方库 现在在自己维护添加了下播事件那些的支持

@4t145
Copy link
Owner

4t145 commented Jul 14, 2023

是的 我fork了一份 用来当我https://github.com/Are-sky/Stargazing这个B站直播监听项目的第三方库 现在在自己维护添加了下播事件那些的支持

好的,欢迎提pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature provide new features
Projects
None yet
Development

No branches or pull requests

2 participants