diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-11-29 19:52:48 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-11-29 19:52:48 +0800 |
commit | 049d71d8745014bf5ec23e25e51d6b92556baa8c (patch) | |
tree | ac94ce8037e8d1c01c1942ccb9fc59417da4e368 /youtube_dl/extractor | |
parent | bf2c8c8f82ff54f9594673c48e531661a72dbdcd (diff) |
[youtube] Simplify and make sure header values are strings
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 52f4fe36d..4f375e2c8 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 Gaming for 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') |