mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
[fix] _get_cookies on Python 2
This commit is contained in:
parent
00eb865b3c
commit
50c217caa8
@ -2830,7 +2830,10 @@ class InfoExtractor(object):
|
|||||||
""" Return a compat_cookies.SimpleCookie with the cookies for the url """
|
""" Return a compat_cookies.SimpleCookie with the cookies for the url """
|
||||||
req = sanitized_Request(url)
|
req = sanitized_Request(url)
|
||||||
self._downloader.cookiejar.add_cookie_header(req)
|
self._downloader.cookiejar.add_cookie_header(req)
|
||||||
return compat_cookies.SimpleCookie(req.get_header('Cookie'))
|
cookie_header = req.get_header('Cookie')
|
||||||
|
if sys.version_info[0] == 2:
|
||||||
|
cookie_header = str(cookie_header)
|
||||||
|
return compat_cookies.SimpleCookie(cookie_header)
|
||||||
|
|
||||||
def _apply_first_set_cookie_header(self, url_handle, cookie):
|
def _apply_first_set_cookie_header(self, url_handle, cookie):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user