diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-18 09:04:30 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-18 09:04:30 +0530 |
commit | 21633673c33f082c6673bc245e4a90d880729a58 (patch) | |
tree | fc306a79b1754a1c596cfd4a7cd1d9d661543044 /yt_dlp/utils.py | |
parent | 80e8493ee7c3083f4e215794e4a67ba5265f24f7 (diff) | |
download | hypervideo-pre-21633673c33f082c6673bc245e4a90d880729a58.tar.lz hypervideo-pre-21633673c33f082c6673bc245e4a90d880729a58.tar.xz hypervideo-pre-21633673c33f082c6673bc245e4a90d880729a58.zip |
[cleanup] Minor fixes
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 3b0e6750c..bcdb7d55b 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -714,7 +714,9 @@ def sanitize_path(s, force=False): def sanitize_url(url): # Prepend protocol-less URLs with `http:` scheme in order to mitigate # the number of unwanted failures due to missing protocol - if url.startswith('//'): + if url is None: + return + elif url.startswith('//'): return 'http:%s' % url # Fix some common typos seen so far COMMON_TYPOS = ( |