Properly handle stream meap not being present
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 1 Oct 2013 12:44:09 +0000 (14:44 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 1 Oct 2013 12:44:09 +0000 (14:44 +0200)
youtube_dl/extractor/youtube.py

index f3b9e3ab17a068ab72b71cf88b3dc0edda5d4dab..890667340852bb946112587dd9f6ee0ce0b9c099 100644 (file)
@@ -1390,7 +1390,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
             args = info['args']
             # Easy way to know if the 's' value is in url_encoded_fmt_stream_map
             # this signatures are encrypted
-            if 'url_encoded_fmt_stream_map':
+            if 'url_encoded_fmt_stream_map' not in args:
                 raise ValueError(u'No stream_map present')  # caught below
             m_s = re.search(r'[&,]s=', args['url_encoded_fmt_stream_map'])
             if m_s is not None: