Merge branch 'spankbang.com' of https://github.com/newtonelectron/youtube-dl into...
authorSergey M․ <dstftw@gmail.com>
Mon, 6 Apr 2015 14:46:40 +0000 (20:46 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 6 Apr 2015 14:46:40 +0000 (20:46 +0600)
youtube_dl/extractor/youtube.py

index f7f701cc56a5332b7dffeb924d0dfff9d94985b5..79ce39aa40bdbf59f7afef403f0afc301333138b 100644 (file)
@@ -495,7 +495,23 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                 'uploader': '孫艾倫',
                 'title': '[A-made] 變態妍字幕版 太妍 我就是這樣的人',
             },
-        }
+        },
+        # url_encoded_fmt_stream_map is empty string
+        {
+            'url': 'qEJwOuvDf7I',
+            'info_dict': {
+                'id': 'qEJwOuvDf7I',
+                'ext': 'mp4',
+                'title': 'Обсуждение судебной практики по выборам 14 сентября 2014 года в Санкт-Петербурге',
+                'description': '',
+                'upload_date': '20150404',
+                'uploader_id': 'spbelect',
+                'uploader': 'Наблюдатели Петербурга',
+            },
+            'params': {
+                'skip_download': 'requires avconv',
+            }
+        },
     ]
 
     def __init__(self, *args, **kwargs):
@@ -855,8 +871,7 @@ 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 or
-                        args['url_encoded_fmt_stream_map'] == ''):
+                if not args.get('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)