mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-04 18:09:36 +02:00
parent
727029c508
commit
c0b6e5c74d
@ -2459,6 +2459,11 @@ def sanitize_numeric_fields(info):
|
|||||||
info_dict['__has_drm'] = any(f.get('has_drm') for f in formats)
|
info_dict['__has_drm'] = any(f.get('has_drm') for f in formats)
|
||||||
if not self.params.get('allow_unplayable_formats'):
|
if not self.params.get('allow_unplayable_formats'):
|
||||||
formats = [f for f in formats if not f.get('has_drm')]
|
formats = [f for f in formats if not f.get('has_drm')]
|
||||||
|
if info_dict['__has_drm'] and all(
|
||||||
|
f.get('acodec') == f.get('vcodec') == 'none' for f in formats):
|
||||||
|
self.report_warning(
|
||||||
|
'This video is DRM protected and only images are available for download. '
|
||||||
|
'Use --list-formats to see them')
|
||||||
|
|
||||||
get_from_start = not info_dict.get('is_live') or bool(self.params.get('live_from_start'))
|
get_from_start = not info_dict.get('is_live') or bool(self.params.get('live_from_start'))
|
||||||
if not get_from_start:
|
if not get_from_start:
|
||||||
@ -2631,8 +2636,9 @@ def is_wellformed(f):
|
|||||||
|
|
||||||
if not formats_to_download:
|
if not formats_to_download:
|
||||||
if not self.params.get('ignore_no_formats_error'):
|
if not self.params.get('ignore_no_formats_error'):
|
||||||
raise ExtractorError('Requested format is not available', expected=True,
|
raise ExtractorError(
|
||||||
video_id=info_dict['id'], ie=info_dict['extractor'])
|
'Requested format is not available. Use --list-formats for a list of available formats',
|
||||||
|
expected=True, video_id=info_dict['id'], ie=info_dict['extractor'])
|
||||||
self.report_warning('Requested format is not available')
|
self.report_warning('Requested format is not available')
|
||||||
# Process what we can, even without any available formats.
|
# Process what we can, even without any available formats.
|
||||||
formats_to_download = [{}]
|
formats_to_download = [{}]
|
||||||
|
Loading…
Reference in New Issue
Block a user