projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69c9cc2
)
[utils] Fix getheader in urlhandle_detect_ext
author
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 15 May 2016 07:32:54 +0000
(15:32 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 15 May 2016 07:34:50 +0000
(15:34 +0800)
Fixes #7049, related to #9440
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index a637563cb8d6562f2a626c8ee72fb9afa7ee505c..24e74428b03b4a532aeadd0a0292bb8023d17473 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-2031,11
+2031,7
@@
def mimetype2ext(mt):
def urlhandle_detect_ext(url_handle):
- try:
- url_handle.headers
- getheader = lambda h: url_handle.headers[h]
- except AttributeError: # Python < 3
- getheader = url_handle.info().getheader
+ getheader = url_handle.headers.get
cd = getheader('Content-Disposition')
if cd: