mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-24 06:36:07 +08:00
[seznamzpravy] A bit shorter duration+tbr extraction
This commit is contained in:
parent
0b74f2f934
commit
e0f78d00e0
@ -44,12 +44,6 @@ class SeznamZpravyIE(InfoExtractor):
|
||||
width, height = fmtdata.get('resolution')
|
||||
except (TypeError, ValueError):
|
||||
width, height = None, None
|
||||
tbr = int_or_none(fmtdata['bandwidth'])
|
||||
if tbr:
|
||||
tbr = int(tbr / 1000)
|
||||
duration = int_or_none(fmtdata['duration'])
|
||||
if duration:
|
||||
duration = int(duration / 1000)
|
||||
|
||||
formats.append({
|
||||
'format_id': fmt,
|
||||
@ -57,8 +51,8 @@ class SeznamZpravyIE(InfoExtractor):
|
||||
'height': int_or_none(height),
|
||||
'url': urljoin(sdn_url, relative_url),
|
||||
'vcodec': fmtdata.get('codec'),
|
||||
'tbr': tbr,
|
||||
'duration': duration,
|
||||
'tbr': int_or_none(fmtdata.get('bandwidth'), scale=1000),
|
||||
'duration': int_or_none(fmtdata.get('duration'), scale=1000),
|
||||
})
|
||||
|
||||
playlists = sdn_data.get('pls', {})
|
||||
|
Loading…
Reference in New Issue
Block a user