A feature-rich command-line audio/video downloader
[YoutubeDL] Ensure protocol is always present
Sergey M․b55594242872
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.pyindex 18b1443b88..09d2b18f26 100755--- a/youtube_dl/YoutubeDL.py+++ b/youtube_dl/YoutubeDL.py@@ -46,6 +46,7 @@ from .utils import (DateRange,DEFAULT_OUTTMPL,determine_ext,+ determine_protocol,DownloadError,encode_compat_str,encodeFilename,@@ -1309,6 +1310,10 @@ class YoutubeDL(object):# Automatically determine file extension if missingif 'ext' not in format:format['ext'] = determine_ext(format['url']).lower()+ # Automatically determine protocol if missing (useful for format+ # selection purposes)+ if 'protocol' not in format:+ format['protocol'] = determine_protocol(format)# Add HTTP headers, so that external programs can use them from the# json outputfull_format_info = info_dict.copy()