summaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-01-20 20:21:24 +0700
committerSergey M․ <dstftw@gmail.com>2019-01-20 20:22:19 +0700
commitfad4ceb53404227f471af2f3544c4c14a5df4acb (patch)
tree56df0b67568b311f2eae4f3bc71c99d154cd250a /youtube_dl/utils.py
parent6945b9e78f38284eb4e440b7badea2fc60b66c2f (diff)
[utils] Fix urljoin for paths with non-http(s) schemes
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index d2d3c1a9f..d0cb65814 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1868,7 +1868,7 @@ def urljoin(base, path):
path = path.decode('utf-8')
if not isinstance(path, compat_str) or not path:
return None
- if re.match(r'^(?:https?:)?//', path):
+ if re.match(r'^(?:[a-zA-Z][a-zA-Z0-9+-.]*:)?//', path):
return path
if isinstance(base, bytes):
base = base.decode('utf-8')