From afb99bca55a2a8f267b483fe0508bd8609b0406c Mon Sep 17 00:00:00 2001 From: shudorcl <1985366171@qq.com> Date: Tue, 28 Oct 2025 15:06:21 +0800 Subject: [PATCH 1/2] fix(bilibili): GetVideoInfo unmarshal key error --- bilibili/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bilibili/api.go b/bilibili/api.go index cc1fbbb..370dc0a 100644 --- a/bilibili/api.go +++ b/bilibili/api.go @@ -200,7 +200,7 @@ func GetVideoInfo(id string) (card Card, err error) { if err != nil { return } - err = json.Unmarshal(binary.StringToBytes(gjson.ParseBytes(data).Raw), &card) + err = json.Unmarshal(binary.StringToBytes(gjson.GetBytes(data, "data").Raw), &card) return } From 0f239e1d2b0e5edc3392300af8adf149783a2d03 Mon Sep 17 00:00:00 2001 From: shudorcl <1985366171@qq.com> Date: Tue, 28 Oct 2025 15:10:36 +0800 Subject: [PATCH 2/2] chore: make lint happy --- bilibili/ctx.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bilibili/ctx.go b/bilibili/ctx.go index c2d5f97..f00d07f 100644 --- a/bilibili/ctx.go +++ b/bilibili/ctx.go @@ -11,6 +11,7 @@ import ( var re = regexp.MustCompile(`^\d+$`) +// RequireUser 查询用户 func RequireUser(cfg *CookieConfig) func(ctx *zero.Ctx) bool { return func(ctx *zero.Ctx) bool { keyword := ctx.State["regex_matched"].([]string)[1]