Skip to content

Commit f4d2392

Browse files
committed
🐛 修改接口变化
1 parent f594161 commit f4d2392

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

plugin/bilibili/bilibili_parse.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,12 @@ func handleArticle(ctx *zero.Ctx) {
163163
}
164164

165165
func handleLive(ctx *zero.Ctx) {
166-
card, err := bz.GetLiveRoomInfo(ctx.State["regex_matched"].([]string)[1])
166+
cookie, err := cfg.Load()
167+
if err != nil {
168+
ctx.SendChain(message.Text("ERROR: ", err))
169+
return
170+
}
171+
card, err := bz.GetLiveRoomInfo(ctx.State["regex_matched"].([]string)[1], cookie)
167172
if err != nil {
168173
ctx.SendChain(message.Text("ERROR: ", err))
169174
return

plugin/bilibili/card2msg_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestVideoInfo(t *testing.T) {
4747
}
4848

4949
func TestLiveRoomInfo(t *testing.T) {
50-
card, err := bz.GetLiveRoomInfo("83171")
50+
card, err := bz.GetLiveRoomInfo("83171", "b_ut=7;buvid3=0;i-wanna-go-back=-1;innersign=0;")
5151
if err != nil {
5252
t.Fatal(err)
5353
}

0 commit comments

Comments
 (0)