diff --git a/bilibili/api.go b/bilibili/api.go index 54a5d1e..48b8a2c 100644 --- a/bilibili/api.go +++ b/bilibili/api.go @@ -225,6 +225,9 @@ func GetVideoSummary(cookiecfg *CookieConfig, id string) (videoSummary VideoSumm req.Header.Set("User-Agent", web.RandUA()) return nil }, nil) + if err != nil { + return + } err = json.Unmarshal(data, &videoSummary) return }