]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[mtv] Fix for videos with missing bitrates
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 26 Jul 2016 05:12:24 +0000 (13:12 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 26 Jul 2016 05:12:24 +0000 (13:12 +0800)
youtube_dl/extractor/mtv.py

index ba9c28a56a02da94e61a2041b882a0938ae77bfc..9e71c08c2298512143be54b94225e7c6ecae42c8 100644 (file)
@@ -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()])