mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-04 04:52:49 -05:00
[utils] Fix urljoin for paths with non-http(s) schemes
This commit is contained in:
@ -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')
|
||||
|
Reference in New Issue
Block a user