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

直播间信息流 获取秘钥需要Cookie #846

Open
VinoxM opened this issue Oct 25, 2023 · 7 comments
Open

直播间信息流 获取秘钥需要Cookie #846

VinoxM opened this issue Oct 25, 2023 · 7 comments
Labels
直播/Live 接口:直播 问题/Question 暂时无法确定的性质

Comments

@VinoxM
Copy link

VinoxM commented Oct 25, 2023

docs/live/message_stream.md#获取信息流认证秘钥

该接口需要Cookie

不带Cookie拿到的Token,用wss连接至直播间会直接断开连接

@VinoxM
Copy link
Author

VinoxM commented Oct 25, 2023

docs/live/info.md#获取直播间信息-1

该接口好像也需要Cookie了

不带Cookie只能获取到默认最低清晰度(qn: 150)的源

@SocialSisterYi SocialSisterYi added 问题/Question 暂时无法确定的性质 直播/Live 接口:直播 labels Oct 25, 2023
@SetSailYu
Copy link

SetSailYu commented Oct 26, 2023

Web端的信息流认证包里也需要携带buvid3信息值才行
{
"uid": *,
"roomid": *,
"protover": 3,
// buvid3
"buvid": *,
"platform": "web",
"type": 2,
"key": *
}

@4t145
Copy link

4t145 commented Nov 1, 2023

想问下需要哪些cookie?
我提供了

  • DedeUserID
  • sid
  • DedeUserID__ckMd5
  • SESSDATA
  • bili_jct
  • buvid3
  • buvid4
    还是连上被秒断

User-Agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64)
Sec-WebSocket-Version = 13

@VinoxM
Copy link
Author

VinoxM commented Nov 1, 2023

想问下需要哪些cookie? 我提供了

  • DedeUserID
  • sid
  • DedeUserID__ckMd5
  • SESSDATA
  • bili_jct
  • buvid3
  • buvid4
    还是连上被秒断

User-Agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) Sec-WebSocket-Version = 13

我用的是 二维码登录-扫码登录(web) 这个接口返回的Cookie,就这个接口文档说明的几个值和Expires

你可以参考一下

@VinoxM
Copy link
Author

VinoxM commented Nov 1, 2023

想问下需要哪些cookie? 我提供了

  • DedeUserID
  • sid
  • DedeUserID__ckMd5
  • SESSDATA
  • bili_jct
  • buvid3
  • buvid4
    还是连上被秒断

User-Agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) Sec-WebSocket-Version = 13

我用的是 二维码登录-扫码登录(web) 这个接口返回的Cookie,就这个接口文档说明的几个值和Expires

你可以参考一下

也可能和 直播间信息流-认证包protover 协议版本有关,我提供的是2

image

这是我提供的属性,可以参考一下

@stackinspector
Copy link
Collaborator

Mozilla/5.0 (Windows NT 10.0; Win64; x64)

你这UA……用完整的最新Chrome的UA

建议protover=3,然后使用br

@cupidads
Copy link

一般还是只要SESSDATA就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
直播/Live 接口:直播 问题/Question 暂时无法确定的性质
Projects
None yet
Development

No branches or pull requests

6 participants