mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-10 08:42:13 +08:00
[televizeseznam] append width and height if resolution field exists
This commit is contained in:
parent
0ace168cea
commit
4761dbc20e
@ -52,15 +52,18 @@ class TelevizeSeznamIE(InfoExtractor):
|
||||
def extract_formats(self, spl_url, play_list, subtitles):
|
||||
formats = []
|
||||
for r, v in play_list.items():
|
||||
formats.append({
|
||||
format = {
|
||||
'format_id': r,
|
||||
'url': urljoin(spl_url, v['url']),
|
||||
'width': v['resolution'][0],
|
||||
'height': v['resolution'][1],
|
||||
'url': urljoin(spl_url, v.get('url')),
|
||||
'protocol': 'https',
|
||||
'ext': 'mp4',
|
||||
'subtitles': subtitles,
|
||||
})
|
||||
}
|
||||
if v.get('resolution'):
|
||||
format.update({ 'width': v['resolution'][0], 'height': v['resolution'][1] })
|
||||
|
||||
formats.append(format)
|
||||
|
||||
return formats
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
Loading…
x
Reference in New Issue
Block a user