From 1704c47ba81dfa6de1b57c1c639863aad37390eb Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sat, 20 Aug 2022 04:52:25 +0530 Subject: [PATCH] [extractor/bitchute] Mark errors as expected Closes #4685 --- yt_dlp/extractor/bitchute.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/bitchute.py b/yt_dlp/extractor/bitchute.py index 24d321566..c9cbb6d1d 100644 --- a/yt_dlp/extractor/bitchute.py +++ b/yt_dlp/extractor/bitchute.py @@ -65,10 +65,12 @@ def _real_extract(self, url): error = self._html_search_regex(r'

([^<]+)

', webpage, 'error', default='Cannot find video') if error == 'Video Unavailable': raise GeoRestrictedError(error) - raise ExtractorError(error) + raise ExtractorError(error, expected=True) formats = entries[0]['formats'] self._check_formats(formats, video_id) + if not formats: + raise self.raise_no_formats('Video is unavailable', expected=True, video_id=video_id) self._sort_formats(formats) description = self._html_search_regex(