]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/common.py
Update to ytdl-commit-654b4f4
[yt-dlp.git] / yt_dlp / extractor / common.py
index 60db9220486407caca1a58d00df5f40972b734e8..0cd217eb3d065ffdcf5eb9d975c6665383f2a191 100644 (file)
@@ -3221,7 +3221,10 @@ def _get_cookies(self, url):
         """ 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):
         """