aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2020-12-30 09:22:30 +0100
committerRemita Amine <remitamine@gmail.com>2020-12-30 09:22:30 +0100
commit9dd674e1d20440564a3d25f33cd8785695e110f6 (patch)
treec0a878181142c7c8267f9c580fb59f7647f9f428 /youtube_dl/utils.py
parent9c1e164e0cd77331ea4f0b474b32fd06f84bad71 (diff)
[utils] accept only supported protocols in url_or_none
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 8cefafd79..d5fb6fd24 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -3640,7 +3640,7 @@ def url_or_none(url):
if not url or not isinstance(url, compat_str):
return None
url = url.strip()
- return url if re.match(r'^(?:[a-zA-Z][\da-zA-Z.+-]*:)?//', url) else None
+ return url if re.match(r'^(?:(?:https?|rt(?:m(?:pt?[es]?|fp)|sp[su]?)|mms|ftps?):)?//', url) else None
def parse_duration(s):