diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-01 06:52:03 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-02 01:08:16 +0530 |
commit | 8f97a15d1c7ebc10d0b51ce24632ac17b34a5f69 (patch) | |
tree | 218588a6ee85435864e9848ce4450d2731c2e35b /yt_dlp/utils.py | |
parent | 47304e07dc4a044242f7d5a14c3f6c3e5f3ad8ba (diff) | |
download | hypervideo-pre-8f97a15d1c7ebc10d0b51ce24632ac17b34a5f69.tar.lz hypervideo-pre-8f97a15d1c7ebc10d0b51ce24632ac17b34a5f69.tar.xz hypervideo-pre-8f97a15d1c7ebc10d0b51ce24632ac17b34a5f69.zip |
[extractor] Framework for embed detection (#4307)
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 57c9961c1..545c02763 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -705,13 +705,13 @@ def sanitize_path(s, force=False): return os.path.join(*sanitized_path) -def sanitize_url(url): +def sanitize_url(url, *, scheme='http'): # Prepend protocol-less URLs with `http:` scheme in order to mitigate # the number of unwanted failures due to missing protocol if url is None: return elif url.startswith('//'): - return 'http:%s' % url + return f'{scheme}:{url}' # Fix some common typos seen so far COMMON_TYPOS = ( # https://github.com/ytdl-org/youtube-dl/issues/15649 |