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

[BUG] 仅有心跳包正常,其他操作都失败 #21

Closed
JokerQyou opened this issue Jun 15, 2022 · 4 comments · Fixed by #22
Closed

[BUG] 仅有心跳包正常,其他操作都失败 #21

JokerQyou opened this issue Jun 15, 2022 · 4 comments · Fixed by #22
Assignees
Labels
bug Something isn't working

Comments

@JokerQyou
Copy link
Contributor

JokerQyou commented Jun 15, 2022

Describe the bug

如题,仅有观看时长的100亲密度成功,其他分享、弹幕等操作应该都失败了。

To Reproduce

正常cron运行。但是在运行的同时手机挂着一个直播间。

Expected behavior

任务能正常完成。

Screenshots

None

Docker (please complete the following information):

  • Docker Version 399e842

Additional context

一些日志

2022/06/16 00:32:47 [ERROR]Unmarshal BiliBaseResp error: unexpected end of JSON input, raw data: []
2022/06/16 00:32:47 [ERROR]ShareRoom error: Post error: <nil>, req: &{POST http://api.live.bilibili.com/xlive/app-room/v1/index/TrigerInteract HTTP/1.1 1 1 map[Accept:[application/json] Accept-Language:[en-US,en;q=0.5] Connection:[keep-alive] Content-Type:[application/x-www-form-urlencoded] User-Agent:[Mozilla/5.0 BiliDroid/6.73.1 (bbcallen@gmail.com) os/android model/Mi 10 Promobi_app/android build/6731100 channel/xiaomi innerVer/6731110 osVer/12 network/2]] {0xc00041a520} 0x646800 165 [] false api.live.bilibili.com map[] map[] <nil> map[]   <nil> <nil> <nil> 0xc000018030}, data: map[access_key:KEY actionKey:appkey appkey:APPKEY interact_type:3 roomid:ROOM_ID sign:SIGN ts:TS]
2022/06/16 00:32:47 [ERROR]Unmarshal BiliBaseResp error: unexpected end of JSON input, raw data: []
2022/06/16 00:32:51 USER [INFO] ROOM 房间弹幕打卡完成
2022/06/16 00:32:51 [ERROR]GetFansMedalAndRoomID error: PostWithParam error: <nil>, req: &{POST http://api.live.bilibili.com/xlive/app-room/v1/dM/sendmsg?access_key=KEY&actionKey=appkey&appkey=APPKEY&sign=sign&ts=TS HTTP/1.1 1 1 map[Accept:[application/json] Accept-Language:[en-US,en;q=0.5] Connection:[keep-alive] Content-Type:[application/x-www-form-urlencoded] User-Agent:[Mozilla/5.0 BiliDroid/6.73.1 (bbcallen@gmail.com) os/android model/Mi 10 Promobi_app/android build/6731100 channel/xiaomi innerVer/6731110 osVer/12 network/2]]{0xc000228500}0x646800 89 [] false api.live.bilibili.com map[] map[] <nil> map[]   <nil> <nil> <nil>0xc000018030}, data: map[cid:CID color:16777215 fontsize:25 msg:(⌒▽⌒). rnd:RND]
2022/06/16 00:32:51 [ERROR]Unmarshal BiliBaseResp error: unexpected end of JSON input, raw data: []
2022/06/16 00:32:52 USER [INFO] 分享完成
@JokerQyou JokerQyou added the bug Something isn't working label Jun 15, 2022
@ThreeCatsLoveFish
Copy link
Owner

应该是全炸了,我等会看看为什么

@JokerQyou
Copy link
Contributor Author

Python 版本没这个问题。如果是被针对性检测到,要么是针对 User-Agent,要么是针对 Go 特有的 TLS 指纹。如果是后者,可以参考:

@ThreeCatsLoveFish
Copy link
Owner

修好了 全部的URL使用https即可 我当时还是看了python版本的才改成的http 看起来被坑了 😄

@ThreeCatsLoveFish
Copy link
Owner

Python 版本没这个问题。如果是被针对性检测到,要么是针对 User-Agent,要么是针对 Go 特有的 TLS 指纹。如果是后者,可以参考:

* [utls](https://github.com/refraction-networking/utls)

* [为什么用 Go 访问某网站始终会 503 Service Unavailable ?](https://www.zackwu.com/posts/2021-03-14-why-i-always-get-503-with-golang/)

这个大可不必担心,因为bili的后端就是用Go写的,照道理再怎么样也不可能反爬自己的语言吧

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

Successfully merging a pull request may close this issue.

2 participants