mirror of
https://github.com/AynaLivePlayer/blivedm-go.git
synced 2025-12-06 11:22:50 +08:00
update
This commit is contained in:
@@ -33,7 +33,7 @@ import (
|
||||
|
||||
func main() {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
c := client.NewClient("732") // 732为房间号
|
||||
c := client.NewClient(732) // 房间号
|
||||
c.SetCookie("") // 由于 B站 反爬虫改版,现在需要使用已登陆账号的 Cookie 才可以正常获取弹幕。如果不设置 Cookie,获取到的弹幕昵称、UID都被限制。还有可能弹幕限流,无法获取到全部内容。
|
||||
//弹幕事件
|
||||
c.OnDanmaku(func(danmaku *message.Danmaku) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
func main() {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
c := client.NewClient("6")
|
||||
c := client.NewClient(6)
|
||||
c.SetCookie("this is a example cookie.")
|
||||
//弹幕事件
|
||||
c.OnDanmaku(func(danmaku *message.Danmaku) {
|
||||
|
||||
Reference in New Issue
Block a user