1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 09:12:40 +01:00

[extractor/bitchute] Mark errors as expected

Closes #4685
This commit is contained in:
pukkandan 2022-08-20 04:52:25 +05:30
parent b76e9cedb3
commit 1704c47ba8
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

View File

@ -65,10 +65,12 @@ def _real_extract(self, url):
error = self._html_search_regex(r'<h1 class="page-title">([^<]+)</h1>', 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(