aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-04-04 03:35:17 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-04-04 03:49:04 +0530
commit39ed931e533a750d1716b74c1fd8133d0b9bc684 (patch)
treee308ce11992eaac099fdf58ac328767a5180a2aa /yt_dlp/extractor/common.py
parentb28f8d244a3cb901eff5be438ad8f0508bd8e024 (diff)
downloadhypervideo-pre-39ed931e533a750d1716b74c1fd8133d0b9bc684.tar.lz
hypervideo-pre-39ed931e533a750d1716b74c1fd8133d0b9bc684.tar.xz
hypervideo-pre-39ed931e533a750d1716b74c1fd8133d0b9bc684.zip
Update to ytdl-commit-654b4f4
[youtube] prioritize information from YoutubeIE for playlist entries https://github.com/ytdl-org/youtube-dl/commit/654b4f4ff2718f38b3182c1188c5d569c14cc70a
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 60db92204..0cd217eb3 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -3221,7 +3221,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):
"""