}
{//初始化
- 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()))
{//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
`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`,
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)
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
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=