1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +00:00

Add option --ignore-no-formats-error

* Ignores the "no video format" and similar errors
* Experimental - Some extractors may still throw these errors
This commit is contained in:
pukkandan
2021-04-17 05:39:58 +05:30
parent 6a39ee13f7
commit b7da73eb19
39 changed files with 103 additions and 76 deletions

View File

@ -10,7 +10,6 @@ from ..compat import (
compat_urllib_parse_urlparse,
)
from ..utils import (
ExtractorError,
int_or_none,
)
@ -193,8 +192,8 @@ class VideomoreIE(InfoExtractor):
error = item.get('error')
if error:
if error in ('Данное видео недоступно для просмотра на территории этой страны', 'Данное видео доступно для просмотра только на территории России'):
self.raise_geo_restricted(countries=['RU'])
raise ExtractorError(error, expected=True)
self.raise_geo_restricted(countries=['RU'], metadata_available=True)
self.raise_no_formats(error, expected=True)
self._sort_formats(formats)
return {