aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-05-16 22:11:34 +0700
committerSergey M․ <dstftw@gmail.com>2017-05-16 22:11:34 +0700
commit6f766798049418c15e3c1b62c046e507093993dd (patch)
tree2315fd24cc6bdc20cb90eb9a3bdbd7dbbbdff88f
parent7073015a23f96ce8ca0400286051d53cb9237a9f (diff)
[extractor/common] Add support for schemeless URLs in _extract_wowza_formats (closes #13088, closes #13092)
-rw-r--r--youtube_dl/extractor/common.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 0bbb1103b..74b6f1197 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -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(