Browse Source

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

Sergey M․ 8 years ago
parent
commit
6f0be93747
1 changed files with 1 additions and 1 deletions
  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()
                 format['ext'] = determine_ext(format['url']).lower()
             # Automatically determine protocol if missing (useful for format
             # Automatically determine protocol if missing (useful for format
             # selection purposes)
             # selection purposes)
-            if 'protocol' not in format:
+            if format.get('protocol') is None:
                 format['protocol'] = determine_protocol(format)
                 format['protocol'] = determine_protocol(format)
             # Add HTTP headers, so that external programs can use them from the
             # Add HTTP headers, so that external programs can use them from the
             # json output
             # json output