mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-26 12:11:52 +00:00
[tvigle] Modernize
This commit is contained in:
parent
eb47569f8a
commit
7584e38ce4
1 changed files with 3 additions and 3 deletions
|
@ -64,8 +64,8 @@ class TvigleIE(InfoExtractor):
|
||||||
item = video_data['playlist']['items'][0]
|
item = video_data['playlist']['items'][0]
|
||||||
|
|
||||||
title = item['title']
|
title = item['title']
|
||||||
description = item['description']
|
description = item.get('description')
|
||||||
thumbnail = item['thumbnail']
|
thumbnail = item.get('thumbnail')
|
||||||
duration = float_or_none(item.get('durationMilliseconds'), 1000)
|
duration = float_or_none(item.get('durationMilliseconds'), 1000)
|
||||||
age_limit = parse_age_limit(item.get('ageRestrictions'))
|
age_limit = parse_age_limit(item.get('ageRestrictions'))
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class TvigleIE(InfoExtractor):
|
||||||
'format_id': '%s-%s' % (vcodec, format_id),
|
'format_id': '%s-%s' % (vcodec, format_id),
|
||||||
'vcodec': vcodec,
|
'vcodec': vcodec,
|
||||||
'height': int_or_none(height),
|
'height': int_or_none(height),
|
||||||
'filesize': item['video_files_size'][vcodec][format_id],
|
'filesize': int_or_none(item.get('video_files_size', {}).get(vcodec, {}).get(format_id)),
|
||||||
})
|
})
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue