projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf2c8c8
)
[youtube] Simplify and make sure header values are strings
author
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 29 Nov 2015 11:52:48 +0000
(19:52 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 29 Nov 2015 11:52:48 +0000
(19:52 +0800)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 52f4fe36da295263db437ea412ff0dad07d4f430..4f375e2c8f217210da842893a4119b33d3911297 100644
(file)
--- 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')