aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/cookies.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-06-21 09:21:20 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-06-21 09:21:20 +0530
commitad54c9130e793ce433bf9da334fa80df9f3aee58 (patch)
tree859a37aa6647ac90e619ba85aa5db58a0c733ae9 /yt_dlp/cookies.py
parentdb3ad8a67661d7b234a6954d9c6a4a9b1749f5eb (diff)
downloadhypervideo-pre-ad54c9130e793ce433bf9da334fa80df9f3aee58.tar.lz
hypervideo-pre-ad54c9130e793ce433bf9da334fa80df9f3aee58.tar.xz
hypervideo-pre-ad54c9130e793ce433bf9da334fa80df9f3aee58.zip
[cleanup] Misc
Closes #6288, Closes #7197, Closes #7265, Closes #7353, Closes #5773 Authored by: mikf, freezboltz, pukkandan
Diffstat (limited to 'yt_dlp/cookies.py')
-rw-r--r--yt_dlp/cookies.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py
index 8693e0b4a..f21e4f7e7 100644
--- a/yt_dlp/cookies.py
+++ b/yt_dlp/cookies.py
@@ -1326,3 +1326,7 @@ class YoutubeDLCookieJar(http.cookiejar.MozillaCookieJar):
cookie_req = urllib.request.Request(escape_url(sanitize_url(url)))
self.add_cookie_header(cookie_req)
return cookie_req.get_header('Cookie')
+
+ def clear(self, *args, **kwargs):
+ with contextlib.suppress(KeyError):
+ return super().clear(*args, **kwargs)