[youtube] The case that 'url_encoded_fmt_stream_map' or 'adaptive_fmts' is the empty...
authorAdrian Kretz <adriankretz@gmail.com>
Wed, 10 Dec 2014 20:51:05 +0000 (21:51 +0100)
committerAdrian Kretz <adriankretz@gmail.com>
Thu, 11 Dec 2014 15:00:46 +0000 (16:00 +0100)
youtube_dl/extractor/youtube.py

index 42441d9fa44fe6673a44988558ec218ad4dd20ee..faac98ce08dabd077d9bf1f8bd1b10b9aea83207 100644 (file)
@@ -934,7 +934,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
                 'url': video_info['conn'][0],
                 'player_url': player_url,
             }]
-        elif len(video_info.get('url_encoded_fmt_stream_map', [])) >= 1 or len(video_info.get('adaptive_fmts', [])) >= 1:
+        elif len(video_info.get('url_encoded_fmt_stream_map', [''])[0]) >= 1 or len(video_info.get('adaptive_fmts', [''])[0]) >= 1:
             encoded_url_map = video_info.get('url_encoded_fmt_stream_map', [''])[0] + ',' + video_info.get('adaptive_fmts', [''])[0]
             if 'rtmpe%3Dyes' in encoded_url_map:
                 raise ExtractorError('rtmpe downloads are not supported, see https://github.com/rg3/youtube-dl/issues/343 for more information.', expected=True)