1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 06:35:12 +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

@@ -2050,7 +2050,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
if not formats:
if not self._downloader.params.get('allow_unplayable_formats') and streaming_data.get('licenseInfos'):
raise ExtractorError(
self.raise_no_formats(
'This video is DRM protected.', expected=True)
pemr = try_get(
playability_status,
@@ -2065,11 +2065,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
if not countries:
regions_allowed = search_meta('regionsAllowed')
countries = regions_allowed.split(',') if regions_allowed else None
self.raise_geo_restricted(
subreason, countries)
self.raise_geo_restricted(subreason, countries, metadata_available=True)
reason += '\n' + subreason
if reason:
raise ExtractorError(reason, expected=True)
self.raise_no_formats(reason, expected=True)
self._sort_formats(formats)