From e2032fdd5c6fbec26776a5fdd70ea17ea2c1b960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=A5=E7=BE=8A?= Date: Mon, 6 Feb 2023 05:50:15 +0800 Subject: [PATCH] fix bug --- Golang/liveurls/huya.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Golang/liveurls/huya.go b/Golang/liveurls/huya.go index 75e239c..399ea05 100644 --- a/Golang/liveurls/huya.go +++ b/Golang/liveurls/huya.go @@ -74,7 +74,7 @@ func (h *Huya) GetLiveUrl() any { str := string(body) freg := regexp.MustCompile(`"(?i)liveLineUrl":"([\s\S]*?)",`) res := freg.FindStringSubmatch(str) - if res == nil { + if res == nil || res[1] == "" { return nil } nstr, _ := base64.StdEncoding.DecodeString(res[1])