From cf9f1d65ca84841be07814d324edcd70c7d42a62 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Sat, 21 Oct 2023 12:50:59 -0400 Subject: [PATCH] Return error if VOD is sub only --- extractor/twitch/VOD.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extractor/twitch/VOD.go b/extractor/twitch/VOD.go index 1b0c1b6..f335543 100644 --- a/extractor/twitch/VOD.go +++ b/extractor/twitch/VOD.go @@ -68,6 +68,10 @@ func GetVODPlaylist(vodID string) ([]byte, error) { return []byte{}, err } + if resp.StatusCode == 403 { + return []byte{}, errors.New("Video is sub-only") + } + body, err := io.ReadAll(resp.Body) if err != nil { return []byte{}, err