From f4ada87e603401a44f70e7f3142c5ffb8de35b4b Mon Sep 17 00:00:00 2001 From: qydysky Date: Sat, 6 Mar 2021 17:15:20 +0800 Subject: [PATCH] =?utf8?q?panic=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- F/api.go | 6 +++--- Send/Send.go | 2 +- Send/Send_gift.go | 2 +- Send/Send_pm.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/F/api.go b/F/api.go index 85d14ed..8374250 100644 --- a/F/api.go +++ b/F/api.go @@ -1105,7 +1105,7 @@ func (i *api) CheckSwitch_FansMedal() { post_str string ) {//生成佩戴信息 - csrf := c.Cookie.LoadV(`bili_jct`).(string) + csrf,_ := c.Cookie.LoadV(`bili_jct`).(string) if csrf == `` {apilog.L(`E: `,"Cookie错误,无bili_jct=");return} post_str = `csrf_token=`+csrf+`&csrf=`+csrf @@ -1375,7 +1375,7 @@ func (i *api) F_x25Kn() (o *api) { loop_num = 0 ) - csrf := c.Cookie.LoadV(`bili_jct`).(string) + csrf,_ := c.Cookie.LoadV(`bili_jct`).(string) if csrf == `` {apilog.L(`E: `,"Cookie错误,无bili_jct");return} LIVE_BUVID := c.Cookie.LoadV(`LIVE_BUVID`).(string) @@ -1756,7 +1756,7 @@ func Silver_2_coin() { } {//交换 - csrf := c.Cookie.LoadV(`bili_jct`).(string) + csrf,_ := c.Cookie.LoadV(`bili_jct`).(string) if csrf == `` {apilog.L(`E: `,"Cookie错误,无bili_jct=");return} post_str := `csrf_token=`+csrf+`&csrf=`+csrf diff --git a/Send/Send.go b/Send/Send.go index 65b0352..578d7a6 100644 --- a/Send/Send.go +++ b/Send/Send.go @@ -35,7 +35,7 @@ func Danmu_s(msg,Cookie string, roomid int) { } } - csrf := c.Cookie.LoadV(`bili_jct`).(string) + csrf,_ := c.Cookie.LoadV(`bili_jct`).(string) if csrf == `` {l.L(`E: `,"Cookie错误,无bili_jct=");return} PostStr := `color=16777215&fontsize=25&mode=1&msg=` + msg + `&rnd=` + strconv.Itoa(int(p.Sys().GetSTime())) + `&roomid=` + strconv.Itoa(roomid) + `&bubble=0&csrf_token=` + csrf + `&csrf=` + csrf diff --git a/Send/Send_gift.go b/Send/Send_gift.go index 5fac6f6..62320ba 100644 --- a/Send/Send_gift.go +++ b/Send/Send_gift.go @@ -19,7 +19,7 @@ func Send_gift(gift_id,bag_id,gift_num int) { if gift_limit.TO() {log.L(`W: `,"超时");return} {//发送请求(银瓜子礼物) - csrf := c.Cookie.LoadV(`bili_jct`).(string) + csrf,_ := c.Cookie.LoadV(`bili_jct`).(string) if csrf == `` {log.L(`E: `,"Cookie错误,无bili_jct=");return} var sendStr = diff --git a/Send/Send_pm.go b/Send/Send_pm.go index 15af2a0..94ba14a 100644 --- a/Send/Send_pm.go +++ b/Send/Send_pm.go @@ -33,7 +33,7 @@ func Send_pm(uid int, msg string) error { return errors.New(`不能发送给自己`) } - csrf := c.Cookie.LoadV(`bili_jct`).(string) + csrf,_ := c.Cookie.LoadV(`bili_jct`).(string) if csrf == `` {return errors.New("Cookie错误,无bili_jct=")} var new_uuid string -- 2.39.2