[adultswim] The bitrate must be an integer or None (reported in #2952)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Thu, 17 Jul 2014 07:31:48 +0000 (09:31 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Thu, 17 Jul 2014 07:31:48 +0000 (09:31 +0200)
youtube_dl/extractor/adultswim.py

index fdaecdec117d7d8198643c2c58ee5e9a90973af5..a00bfcb35fc8f61b2192592a57776921d0dee9f6 100644 (file)
@@ -110,7 +110,8 @@ class AdultSwimIE(InfoExtractor):
                     'format_id': '%s-%s' % (bitrate, type),
                     'url': file_el.text,
                     'ext': self._video_extensions.get(bitrate, 'mp4'),
-                    'tbr': bitrate,
+                    # The bitrate may not be a number (for example: 'iphone')
+                    'tbr': int(bitrate) if bitrate.isdigit() else None,
                     'height': height,
                     'width': width
                 })