mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[nba] handle format info properly
This commit is contained in:
		| @@ -77,14 +77,18 @@ class NBAIE(InfoExtractor): | |||||||
|                     formats.extend(f4m_formats) |                     formats.extend(f4m_formats) | ||||||
|             else: |             else: | ||||||
|                 key = video_file.attrib.get('bitrate') |                 key = video_file.attrib.get('bitrate') | ||||||
|                 mobj = re.search(r'(\d+)x(\d+)(?:_(\d+))?', key) |                 format_info = { | ||||||
|                 formats.append({ |  | ||||||
|                     'format_id': key, |                     'format_id': key, | ||||||
|                     'url': video_url, |                     'url': video_url, | ||||||
|                     'width': int_or_none(mobj.group(1)), |                 } | ||||||
|                     'height': int_or_none(mobj.group(2)), |                 mobj = re.search(r'(\d+)x(\d+)(?:_(\d+))?', key) | ||||||
|                     'tbr': int_or_none(mobj.group(3)), |                 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) |         self._sort_formats(formats) | ||||||
|  |  | ||||||
|         return { |         return { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 remitamine
					remitamine