]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/common.py
[cookies] Parse cookies leniently (#4780)
[yt-dlp.git] / yt_dlp / extractor / common.py
index 30042d61feade16ca9bc48859576903f4b990c44..e8fa8fdde8b73745e4f5603fd850a4279382e42b 100644 (file)
@@ -22,6 +22,7 @@
 
 from ..compat import functools  # isort: split
 from ..compat import compat_etree_fromstring, compat_expanduser, compat_os_name
+from ..cookies import LenientSimpleCookie
 from ..downloader import FileDownloader
 from ..downloader.f4m import get_base_url, remove_encrypted_media
 from ..utils import (
@@ -3632,7 +3633,7 @@ def _set_cookie(self, domain, name, value, expire_time=None, port=None,
 
     def _get_cookies(self, url):
         """ Return a http.cookies.SimpleCookie with the cookies for the url """
-        return http.cookies.SimpleCookie(self._downloader._calc_cookies(url))
+        return LenientSimpleCookie(self._downloader._calc_cookies(url))
 
     def _apply_first_set_cookie_header(self, url_handle, cookie):
         """