]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/utils.py
[cleanup] Minor fixes
[yt-dlp.git] / yt_dlp / utils.py
index 3b0e6750c379c5461c37b08e5f5e7e6dafbf0453..bcdb7d55b61488c2dda9d22307c13a9fdac3673b 100644 (file)
@@ -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 = (