mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[neteasemusic] Use float_or_none
This commit is contained in:
		| @@ -12,7 +12,10 @@ from ..compat import ( | |||||||
|     compat_str, |     compat_str, | ||||||
|     compat_itertools_count, |     compat_itertools_count, | ||||||
| ) | ) | ||||||
| from ..utils import sanitized_Request | from ..utils import ( | ||||||
|  |     sanitized_Request, | ||||||
|  |     float_or_none, | ||||||
|  | ) | ||||||
|  |  | ||||||
|  |  | ||||||
| class NetEaseMusicBaseIE(InfoExtractor): | class NetEaseMusicBaseIE(InfoExtractor): | ||||||
| @@ -52,7 +55,7 @@ class NetEaseMusicBaseIE(InfoExtractor): | |||||||
|                     formats.append({ |                     formats.append({ | ||||||
|                         'url': song_url, |                         'url': song_url, | ||||||
|                         'ext': details.get('extension'), |                         'ext': details.get('extension'), | ||||||
|                         'abr': details.get('bitrate', 0) / 1000, |                         'abr': float_or_none(details.get('bitrate'), scale=1000), | ||||||
|                         'format_id': song_format, |                         'format_id': song_format, | ||||||
|                         'filesize': details.get('size'), |                         'filesize': details.get('size'), | ||||||
|                         'asr': details.get('sr') |                         'asr': details.get('sr') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yen Chi Hsuan
					Yen Chi Hsuan