]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve biliApi
authorqydysky <qydysky@foxmail.com>
Sun, 12 May 2024 14:40:13 +0000 (14:40 +0000)
committerqydysky <qydysky@foxmail.com>
Sun, 12 May 2024 14:40:13 +0000 (14:40 +0000)
F/api.go

index 87da7b3a1caf12cbf106f45a25bdc9c4ee48894d..596e1fe24a5feef343dcecb8241d8a52c367ad73 100644 (file)
--- 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