mirror of https://github.com/yt-dlp/yt-dlp.git
[voot] fix format extraction(closes #14758)
This commit is contained in:
parent
8ff2b16435
commit
1c4804ef9b
|
@ -2,7 +2,6 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .kaltura import KalturaIE
|
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
@ -17,11 +16,10 @@ class VootIE(InfoExtractor):
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.voot.com/shows/ishq-ka-rang-safed/1/360558/is-this-the-end-of-kamini-/441353',
|
'url': 'https://www.voot.com/shows/ishq-ka-rang-safed/1/360558/is-this-the-end-of-kamini-/441353',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '0_8ledb18o',
|
'id': '441353',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Ishq Ka Rang Safed - Season 01 - Episode 340',
|
'title': 'Ishq Ka Rang Safed - Season 01 - Episode 340',
|
||||||
'description': 'md5:06291fbbbc4dcbe21235c40c262507c1',
|
'description': 'md5:06291fbbbc4dcbe21235c40c262507c1',
|
||||||
'uploader_id': 'batchUser',
|
|
||||||
'timestamp': 1472162937,
|
'timestamp': 1472162937,
|
||||||
'upload_date': '20160825',
|
'upload_date': '20160825',
|
||||||
'duration': 1146,
|
'duration': 1146,
|
||||||
|
@ -61,8 +59,10 @@ class VootIE(InfoExtractor):
|
||||||
|
|
||||||
media = media_info['assets']
|
media = media_info['assets']
|
||||||
|
|
||||||
entry_id = media['EntryId']
|
|
||||||
title = media['MediaName']
|
title = media['MediaName']
|
||||||
|
formats = self._extract_m3u8_formats(
|
||||||
|
'https://cdnapisec.kaltura.com/p/1982551/playManifest/pt/https/f/applehttp/t/web/e/' + media['EntryId'],
|
||||||
|
video_id, 'mp4', m3u8_id='hls', fatal=False)
|
||||||
|
|
||||||
description, series, season_number, episode, episode_number = [None] * 5
|
description, series, season_number, episode, episode_number = [None] * 5
|
||||||
|
|
||||||
|
@ -82,9 +82,7 @@ class VootIE(InfoExtractor):
|
||||||
episode_number = int_or_none(value)
|
episode_number = int_or_none(value)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'_type': 'url_transparent',
|
'id': video_id,
|
||||||
'url': 'kaltura:1982551:%s' % entry_id,
|
|
||||||
'ie_key': KalturaIE.ie_key(),
|
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
'description': description,
|
||||||
'series': series,
|
'series': series,
|
||||||
|
@ -95,4 +93,5 @@ class VootIE(InfoExtractor):
|
||||||
'duration': int_or_none(media.get('Duration')),
|
'duration': int_or_none(media.get('Duration')),
|
||||||
'view_count': int_or_none(media.get('ViewCounter')),
|
'view_count': int_or_none(media.get('ViewCounter')),
|
||||||
'like_count': int_or_none(media.get('like_counter')),
|
'like_count': int_or_none(media.get('like_counter')),
|
||||||
|
'formats': formats,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue