From 283b6b31f55d34de5122e5e0a09fa47c5049b908 Mon Sep 17 00:00:00 2001 From: bibiak <24386585+bibiak1@users.noreply.github.com> Date: Mon, 22 May 2023 21:21:27 +0200 Subject: [PATCH] Update youtube_dl/extractor/tvp.py Co-authored-by: dirkf --- youtube_dl/extractor/tvp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/extractor/tvp.py b/youtube_dl/extractor/tvp.py index e90f09da3..de28230d7 100644 --- a/youtube_dl/extractor/tvp.py +++ b/youtube_dl/extractor/tvp.py @@ -381,6 +381,9 @@ class TVPIE(InfoExtractor): if ie_cls.suitable(urlh.url): return self.url_result(urlh.url, ie=ie_cls.ie_key(), video_id=page_id) + if urlh.getcode() == 404: + raise compat_HTTPError(url, 404, 'HTTP Error 404: Not Found', urlh.headers, urlh) + if re.search( r'window\s*\.\s*__(?:video|news|website|directory)Data\s*=', webpage):