From dbe359233a2f1c66c673e7e2725bd9035fa5f043 Mon Sep 17 00:00:00 2001 From: qydysky Date: Tue, 16 Mar 2021 20:00:45 +0800 Subject: [PATCH] =?utf8?q?=E5=9C=A8=E5=8F=91=E9=80=81=E7=A4=BC=E7=89=A9?= =?utf8?q?=E5=89=8D=E5=85=88=E8=8E=B7=E5=8F=96=E4=B8=BB=E6=92=ADuid?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Send/Send_gift.go | 2 ++ bili_danmu.go | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Send/Send_gift.go b/Send/Send_gift.go index 8976287..4e68b53 100644 --- a/Send/Send_gift.go +++ b/Send/Send_gift.go @@ -18,6 +18,8 @@ func Send_gift(gift_id,bag_id,gift_num int) { if gift_limit.TO() {log.L(`W: `,"超时");return} + if c.UpUid == 0 {log.L(`W: `,"还未获取到Up主uid");return} + {//发送请求(银瓜子礼物) csrf,_ := c.Cookie.LoadV(`bili_jct`).(string) if csrf == `` {log.L(`E: `,"Cookie错误,无bili_jct=");return} diff --git a/bili_danmu.go b/bili_danmu.go index 91f0c18..df49c05 100644 --- a/bili_danmu.go +++ b/bili_danmu.go @@ -160,7 +160,10 @@ func Demo(roomid ...int) { } } } - + + //api + api := F.New_api(c.Roomid) + //命令行操作 切换房间 发送弹幕 go F.Cmd() //兑换硬币 @@ -175,7 +178,7 @@ func Demo(roomid ...int) { for !exit_sign { danmulog.L(`T: `,"准备") //获取房间相关信息 - api := F.New_api(c.Roomid).Get_host_Token().Get_live() + api.Get_info().Get_host_Token().Get_live() c.Roomid = api.Roomid //获取用户版本 api.Get_Version() -- 2.39.2