projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04d4a3b
)
[extractor/common] fix _get_cookies method for python 2(#20673, #23256, #20326, close...
author
Remita Amine
<remitamine@gmail.com>
Sat, 3 Apr 2021 06:54:02 +0000
(07:54 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Sat, 3 Apr 2021 06:54:16 +0000
(07:54 +0100)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index d3b6724dfb3bc194bdad9dbb527352eb3ca83a5a..fcbf18ee6a20a8719f49cc1459aeff35ee7f0b8e 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-2899,7
+2899,10
@@
class InfoExtractor(object):
""" Return a compat_cookies.SimpleCookie with the cookies for the url """
req = sanitized_Request(url)
self._downloader.cookiejar.add_cookie_header(req)
- return compat_cookies.SimpleCookie(req.get_header('Cookie'))
+ cookie = req.get_header('Cookie')
+ if cookie and sys.version_info[0] == 2:
+ cookie = str(cookie)
+ return compat_cookies.SimpleCookie(cookie)
def _apply_first_set_cookie_header(self, url_handle, cookie):
"""