From 77674d7901ce292aca095df917f880727b9f2634 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Fri, 31 May 2024 16:03:06 +0900 Subject: [PATCH] fix douyin hidden live (#736) --- src/live/douyin/douyin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/live/douyin/douyin.go b/src/live/douyin/douyin.go index 972a3daa..9dd5c5a7 100644 --- a/src/live/douyin/douyin.go +++ b/src/live/douyin/douyin.go @@ -393,7 +393,11 @@ func (l *Live) legacy_GetInfo(body string) (info *live.Info, err error) { if statusJson.Exists() { isLiving = statusJson.Int() == 2 } else { - isLiving = data.Get("data.room_status").Int() == 0 + isLivingJson := data.Get("data.room_status") + if !isLivingJson.Exists() { + return nil, fmt.Errorf("failed to get room status") + } + isLiving = isLivingJson.Int() == 0 } info = &live.Info{ Live: l,