From: qydysky Date: Sun, 12 May 2024 14:40:13 +0000 (+0000) Subject: Improve biliApi X-Git-Tag: v0.13.9~4 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=2695be853188b4fde0dccb9c779cf0c748c9fca0;p=bili_danmu%2F.git Improve biliApi --- diff --git a/F/api.go b/F/api.go index 87da7b3..596e1fe 100644 --- a/F/api.go +++ b/F/api.go @@ -33,7 +33,6 @@ import ( qr "github.com/skip2/go-qrcode" ) -const webImg = "webImg" const id = "github.com/qydysky/bili_danmu/F.biliApi" var apilog = c.C.Log.Base(`api`) @@ -843,10 +842,9 @@ func (t *GetFunc) Get_cookie() (missKey []string) { `DedeUserID`, }); len(miss) == 0 { biliApi.SetCookies(reqf.Cookies_String_2_List(cookieString)) - if e, res := biliApi.GetNav(); e != nil { + if e, _ := biliApi.GetNav(); e != nil { apilog.L(`E: `, e) } else { - t.Cache.Store(webImg, &res, time.Hour) apilog.L(`I: `, `已登录`) return } @@ -1449,12 +1447,6 @@ func GetHistory(Roomid_int int) (j []string) { } } -type searchresult struct { - Roomid int - Uname string - Is_live bool -} - func (c *GetFunc) SearchUP(s string) (list []struct { Roomid int Uname string