]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/common] Respect secure schemes in _extract_wowza_formats
authorSergey M․ <dstftw@gmail.com>
Mon, 5 Feb 2018 16:41:55 +0000 (23:41 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 5 Feb 2018 16:56:00 +0000 (23:56 +0700)
youtube_dl/extractor/common.py

index 988fc15ff2c0c0fdbb3c3ae55e72d69c09d239a3..ff62b5cf3c122eb267007599532f96e7cb178717 100644 (file)
@@ -2250,9 +2250,10 @@ class InfoExtractor(object):
     def _extract_wowza_formats(self, url, video_id, m3u8_entry_protocol='m3u8_native', skip_protocols=[]):
         query = compat_urlparse.urlparse(url).query
         url = re.sub(r'/(?:manifest|playlist|jwplayer)\.(?:m3u8|f4m|mpd|smil)', '', url)
-        url_base = self._search_regex(
-            r'(?:(?:https?|rtmp|rtsp):)?(//[^?]+)', url, 'format url')
-        http_base_url = '%s:%s' % ('http', url_base)
+        mobj = re.search(
+            r'(?:(?:http|rtmp|rtsp)(?P<s>s)?:)?(?P<url>//[^?]+)', url)
+        url_base = mobj.group('url')
+        http_base_url = '%s%s:%s' % ('http', mobj.group('s') or '', url_base)
         formats = []
 
         def manifest_url(manifest):