]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/common] Add support for schemeless URLs in _extract_wowza_formats (closes...
authorSergey M․ <dstftw@gmail.com>
Tue, 16 May 2017 15:11:34 +0000 (22:11 +0700)
committerSergey M․ <dstftw@gmail.com>
Tue, 16 May 2017 15:11:34 +0000 (22:11 +0700)
youtube_dl/extractor/common.py

index 0bbb1103bf93fa2f0fe41496c0c037c95cdf02e9..74b6f1197bc77f3ad4c87b25127ce914b2359da8 100644 (file)
@@ -2205,8 +2205,9 @@ class InfoExtractor(object):
 
     def _extract_wowza_formats(self, url, video_id, m3u8_entry_protocol='m3u8_native', skip_protocols=[]):
         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 = 'http' + url_base
+        url_base = self._search_regex(
+            r'(?:(?:https?|rtmp|rtsp):)?(//[^?]+)', url, 'format url')
+        http_base_url = self._proto_relative_url(url_base, scheme='http:')
         formats = []
         if 'm3u8' not in skip_protocols:
             formats.extend(self._extract_m3u8_formats(