From 357ef7ec2e5618407c2fedbbb2890bd5da75da0f Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 7 Feb 2021 19:58:04 +0800 Subject: [PATCH] =?utf8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- F/api.go | 15 ++++++++++++--- F/xinxin.go | 2 +- demo/go.mod | 2 +- demo/go.sum | 4 ++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/F/api.go b/F/api.go index 93ba79b..9724822 100644 --- a/F/api.go +++ b/F/api.go @@ -1143,7 +1143,12 @@ func (i *api) F_x25Kn() (o *api) { } {//初始化 - if !c.Bootmap.Check(`api.F_x25Kn`, func_id) {apilog.L(`I: `,`多余退出`);return}//有新会话产生,旧的退出 + if !c.Bootmap.Check(`api.F_x25Kn`, func_id) { + apilog.L(`I: `,`多余退出`) + return + }//有新会话产生,旧的退出 + func_id = c.Bootmap.Set(`api.F_x25Kn`)//刷新 + PostStr := `id=[`+strconv.Itoa(o.Parent_area_id)+`,`+strconv.Itoa(o.Area_id)+`,`+strconv.Itoa(loop_num)+`,`+strconv.Itoa(o.Roomid)+`]&` PostStr += `device=["`+LIVE_BUVID+`","`+new_uuid+`"]&` PostStr += `ts=`+strconv.Itoa(int(p.Sys().GetMTime())) @@ -1192,7 +1197,12 @@ func (i *api) F_x25Kn() (o *api) { {//loop for loop_num < 24*5 { <- time.After(time.Second*time.Duration(res.Data.Heartbeat_interval)) - if !c.Bootmap.Check(`api.F_x25Kn`, func_id) {apilog.L(`I: `,`多余退出`);return}//有新会话产生,旧的退出 + + if !c.Bootmap.Check(`api.F_x25Kn`, func_id) { + apilog.L(`I: `,`多余退出`) + return + }//有新会话产生,旧的退出 + func_id = c.Bootmap.Set(`api.F_x25Kn`)//刷新 loop_num += 1 @@ -1313,7 +1323,6 @@ func Gift_list() (list []Gift_list_type_Data_List) { `Host`: `api.live.bilibili.com`, `User-Agent`: `Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0`, `Accept`: `application/json, text/plain, */*`, - `Content-Type`: `application/x-www-form-urlencoded`, `Accept-Language`: `zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2`, `Accept-Encoding`: `gzip, deflate, br`, `Origin`: `https://live.bilibili.com`, diff --git a/F/xinxin.go b/F/xinxin.go index 653be00..0c54afc 100644 --- a/F/xinxin.go +++ b/F/xinxin.go @@ -120,7 +120,7 @@ func Wasm(uid uintptr,s RT) (o string) { for try:=5;try > 0 && ws.Len() == 0;try-=1 {//没有从池中取出 open.Run(webpath) wslog.L(`I: `,`浏览器打开`,webpath) - time.Sleep(time.Second) + time.Sleep(time.Second*time.Duration(3)) } b, e := json.Marshal(s) diff --git a/demo/go.mod b/demo/go.mod index aff91e2..f6f79b6 100644 --- a/demo/go.mod +++ b/demo/go.mod @@ -11,7 +11,7 @@ require ( github.com/miekg/dns v1.1.38 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/qydysky/bili_danmu v0.5.7 - github.com/qydysky/part v0.3.11 // indirect + github.com/qydysky/part v0.3.13 // indirect github.com/shirou/gopsutil v3.21.1+incompatible // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect diff --git a/demo/go.sum b/demo/go.sum index 58ce092..76a91bc 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -133,6 +133,10 @@ github.com/qydysky/part v0.3.10 h1:hb6HcedujeqfKWmV1r30Wu9JYcajS0cM4bLFco63bIY= github.com/qydysky/part v0.3.10/go.mod h1:43opuciW71sZvOR67kye50jgMDSDrn/t6+LefNdlXPg= github.com/qydysky/part v0.3.11 h1:GNNgS4lNWi2iw8E9HYKgje4+w0uwTb2+2XkKxAnFnjM= github.com/qydysky/part v0.3.11/go.mod h1:43opuciW71sZvOR67kye50jgMDSDrn/t6+LefNdlXPg= +github.com/qydysky/part v0.3.12 h1:RWBGvieO2pCAEvk7378otIzoHlB6CcL2Ho5FfXDLk3w= +github.com/qydysky/part v0.3.12/go.mod h1:43opuciW71sZvOR67kye50jgMDSDrn/t6+LefNdlXPg= +github.com/qydysky/part v0.3.13 h1:GN5SvmdcGwGbzP+N7cgxEgIzL2CdSSFoMXGbPIfM9os= +github.com/qydysky/part v0.3.13/go.mod h1:43opuciW71sZvOR67kye50jgMDSDrn/t6+LefNdlXPg= github.com/qydysky/part/msgq v0.0.0-20201213031129-ca3253dc72ad h1:Jtzf509lQrkUMGTV0Sc6IDCAiR1VrBcHrIban7hpye4= github.com/qydysky/part/msgq v0.0.0-20201213031129-ca3253dc72ad/go.mod h1:w32TkJNVtTJd4LOS09cq+4uYG6itcN2vsqw+slp44Rg= github.com/qydysky/part/msgq v0.0.0-20201213120821-f36e49c32bba h1:1ew9dRpc0Rux0WkWeT/4AE15ynYWmL2D7onJEJIFOB8= -- 2.39.2