Skip to content

A feature-rich command-line audio/video downloader

[mtv] Fix for videos with missing bitrates

Yen Chi Hsuan10a1bb3a7845
diff --git a/youtube_dl/extractor/mtv.py b/youtube_dl/extractor/mtv.py
index ba9c28a56a..9e71c08c22 100644
--- a/youtube_dl/extractor/mtv.py
+++ b/youtube_dl/extractor/mtv.py
@@ -91,7 +91,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
formats.extend([{
'ext': 'flv' if new_url.startswith('rtmp') else ext,
'url': new_url,
- 'format_id': '-'.join([kind, rendition.get('bitrate')]),
+ 'format_id': '-'.join(filter(None, [kind, rendition.get('bitrate')])),
'width': int(rendition.get('width')),
'height': int(rendition.get('height')),
} for kind, new_url in new_urls.items()])