mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-16 10:32:40 +09:00
[nba] handle format info properly
This commit is contained in:
parent
77334ccb44
commit
cb160dd531
@ -77,14 +77,18 @@ class NBAIE(InfoExtractor):
|
||||
formats.extend(f4m_formats)
|
||||
else:
|
||||
key = video_file.attrib.get('bitrate')
|
||||
mobj = re.search(r'(\d+)x(\d+)(?:_(\d+))?', key)
|
||||
formats.append({
|
||||
format_info = {
|
||||
'format_id': key,
|
||||
'url': video_url,
|
||||
}
|
||||
mobj = re.search(r'(\d+)x(\d+)(?:_(\d+))?', key)
|
||||
if mobj:
|
||||
format_info.update({
|
||||
'width': int_or_none(mobj.group(1)),
|
||||
'height': int_or_none(mobj.group(2)),
|
||||
'tbr': int_or_none(mobj.group(3)),
|
||||
})
|
||||
formats.append(format_info)
|
||||
self._sort_formats(formats)
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user