瀏覽代碼

[YoutubeDL] Improve protocol auto determining (closes #11720)

Sergey M․ 8 年之前
父節點
當前提交
6f0be93747
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/YoutubeDL.py

+ 1 - 1
youtube_dl/YoutubeDL.py

@@ -1363,7 +1363,7 @@ class YoutubeDL(object):
                 format['ext'] = determine_ext(format['url']).lower()
             # Automatically determine protocol if missing (useful for format
             # selection purposes)
-            if 'protocol' not in format:
+            if format.get('protocol') is None:
                 format['protocol'] = determine_protocol(format)
             # Add HTTP headers, so that external programs can use them from the
             # json output