[youtube] Enhance url_encoded_fmt_stream_map checking (fix #5361)
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 5 Apr 2015 14:29:06 +0000 (22:29 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 5 Apr 2015 14:29:06 +0000 (22:29 +0800)
youtube_dl/extractor/youtube.py

index 5488101e1997d1078c44a73ef0af5487aa3dcea9..f7f701cc56a5332b7dffeb924d0dfff9d94985b5 100644 (file)
@@ -855,7 +855,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                 args = ytplayer_config['args']
                 # Convert to the same format returned by compat_parse_qs
                 video_info = dict((k, [v]) for k, v in args.items())
-                if 'url_encoded_fmt_stream_map' not in args:
+                if ('url_encoded_fmt_stream_map' not in args or
+                        args['url_encoded_fmt_stream_map'] == ''):
                     raise ValueError('No stream_map present')  # caught below
             except ValueError:
                 # We fallback to the get_video_info pages (used by the embed page)