From 63a707e70ac2e4385cef1f214a5c9421ef6d25c2 Mon Sep 17 00:00:00 2001 From: dilap54 Date: Mon, 3 Feb 2025 20:14:44 +0300 Subject: [PATCH] add err --- goutubedl.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/goutubedl.go b/goutubedl.go index cfee4cc..77b500e 100644 --- a/goutubedl.go +++ b/goutubedl.go @@ -493,7 +493,10 @@ func infoFromURL( for _, caption := range info.AutomaticCaptions[lang] { resp, respErr := get(caption.URL) if respErr == nil { - buf, _ := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) + if err != nil { + options.DebugLog.Print("err", "download "+caption.URL, err) + } resp.Body.Close() caption.Bytes = buf }