aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorSimon Sawicki <37424085+Grub4K@users.noreply.github.com>2022-09-16 19:02:00 +0200
committerGitHub <noreply@github.com>2022-09-16 22:32:00 +0530
commit8817a80d3ac69f2dfd12bdc41657c4a04139807c (patch)
treea4303b0b928b09433651dd52c0907fc774836fe7 /yt_dlp/extractor/common.py
parent5736d79172c47ff84740d5720467370a560febad (diff)
downloadhypervideo-pre-8817a80d3ac69f2dfd12bdc41657c4a04139807c.tar.lz
hypervideo-pre-8817a80d3ac69f2dfd12bdc41657c4a04139807c.tar.xz
hypervideo-pre-8817a80d3ac69f2dfd12bdc41657c4a04139807c.zip
[cookies] Parse cookies leniently (#4780)
Closes #4776, #3778 Authored by: Grub4K
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 30042d61f..e8fa8fdde 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -22,6 +22,7 @@ import xml.etree.ElementTree
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 @@ class InfoExtractor:
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):
"""