A feature-rich command-line audio/video downloader
[youtube] Simplify and make sure header values are strings
Yen Chi Hsuan049d71d87450
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.pyindex 52f4fe36da..4f375e2c8f 100644--- a/youtube_dl/extractor/youtube.py+++ b/youtube_dl/extractor/youtube.py@@ -1477,9 +1477,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):formats = _map_to_format_list(url_map)# Accept-Encoding header causes failures in live streams on Youtube and Youtube Gamingfor a_format in formats:- if 'http_headers' not in a_format:- a_format['http_headers'] = {}- a_format['http_headers']['Youtubedl-no-compression'] = True+ a_format.setdefault('http_headers', {})['Youtubedl-no-compression'] = 'True'else:raise ExtractorError('no conn, hlsvp or url_encoded_fmt_stream_map information found in video info')