mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 09:27:15 +08:00
ivi.ru notifies when all video formats are DRM-encrypted
This commit is contained in:
parent
c65c6fe2ee
commit
da7e916836
@ -78,8 +78,7 @@ class IviIE(InfoExtractor):
|
|||||||
# Sorted by quality
|
# Sorted by quality
|
||||||
_KNOWN_FORMATS = (
|
_KNOWN_FORMATS = (
|
||||||
'MP4-low-mobile', 'MP4-mobile', 'FLV-lo', 'MP4-lo', 'FLV-hi', 'MP4-hi',
|
'MP4-low-mobile', 'MP4-mobile', 'FLV-lo', 'MP4-lo', 'FLV-hi', 'MP4-hi',
|
||||||
'MP4-SHQ', 'MP4-HD720', 'MP4-HD1080', 'VODDASH-MDRM-HD1080', 'VODHLS-FPS-HD1080',
|
'MP4-SHQ', 'MP4-HD720', 'MP4-HD1080')
|
||||||
'DASH-MDRM-HD1080')
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
@ -157,14 +156,18 @@ class IviIE(InfoExtractor):
|
|||||||
for f in result.get('files', []):
|
for f in result.get('files', []):
|
||||||
f_url = f.get('url')
|
f_url = f.get('url')
|
||||||
content_format = f.get('content_format')
|
content_format = f.get('content_format')
|
||||||
# if not f_url or '-MDRM-' in content_format or '-FPS-' in content_format:
|
if not f_url or '-MDRM-' in content_format or '-FPS-' in content_format:
|
||||||
# continue
|
continue
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': f_url,
|
'url': f_url,
|
||||||
'format_id': content_format,
|
'format_id': content_format,
|
||||||
'quality': quality(content_format),
|
'quality': quality(content_format),
|
||||||
'filesize': int_or_none(f.get('size_in_bytes')),
|
'filesize': int_or_none(f.get('size_in_bytes')),
|
||||||
})
|
})
|
||||||
|
if len(formats) == 0:
|
||||||
|
raise ExtractorError(
|
||||||
|
'All formats are DRM-crypted. They are not supported',
|
||||||
|
expected=True)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
compilation = result.get('compilation')
|
compilation = result.get('compilation')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user