Explorar o código

Properly handle stream meap not being present

Philipp Hagemeister %!s(int64=12) %!d(string=hai) anos
pai
achega
44d466559e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/extractor/youtube.py

+ 1 - 1
youtube_dl/extractor/youtube.py

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