aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/cookies.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-07-22 09:08:12 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-07-22 09:09:52 +0530
commit62b5c94cadaa5f596dc1a7083db9db12efe357be (patch)
tree4a1035e30da1d88345252118b5f4083284775833 /yt_dlp/cookies.py
parente0c4db04dc82a699bdabd9821ddc239ebe17d30a (diff)
downloadhypervideo-pre-62b5c94cadaa5f596dc1a7083db9db12efe357be.tar.lz
hypervideo-pre-62b5c94cadaa5f596dc1a7083db9db12efe357be.tar.xz
hypervideo-pre-62b5c94cadaa5f596dc1a7083db9db12efe357be.zip
[cleanup] Misc fixes
Closes #7528
Diffstat (limited to 'yt_dlp/cookies.py')
-rw-r--r--yt_dlp/cookies.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py
index 16f1918e6..80428c747 100644
--- a/yt_dlp/cookies.py
+++ b/yt_dlp/cookies.py
@@ -97,7 +97,7 @@ def load_cookies(cookie_file, browser_specification, ydl):
jar = YoutubeDLCookieJar(cookie_file)
if not is_filename or os.access(cookie_file, os.R_OK):
- jar.load(ignore_discard=True, ignore_expires=True)
+ jar.load()
cookie_jars.append(jar)
return _merge_cookie_jars(cookie_jars)
@@ -1213,7 +1213,7 @@ class YoutubeDLCookieJar(http.cookiejar.MozillaCookieJar):
file.truncate(0)
yield file
- def _really_save(self, f, ignore_discard=False, ignore_expires=False):
+ def _really_save(self, f, ignore_discard, ignore_expires):
now = time.time()
for cookie in self:
if (not ignore_discard and cookie.discard
@@ -1234,7 +1234,7 @@ class YoutubeDLCookieJar(http.cookiejar.MozillaCookieJar):
name, value
)))
- def save(self, filename=None, *args, **kwargs):
+ def save(self, filename=None, ignore_discard=True, ignore_expires=True):
"""
Save cookies to a file.
Code is taken from CPython 3.6
@@ -1253,9 +1253,9 @@ class YoutubeDLCookieJar(http.cookiejar.MozillaCookieJar):
with self.open(filename, write=True) as f:
f.write(self._HEADER)
- self._really_save(f, *args, **kwargs)
+ self._really_save(f, ignore_discard, ignore_expires)
- def load(self, filename=None, ignore_discard=False, ignore_expires=False):
+ def load(self, filename=None, ignore_discard=True, ignore_expires=True):
"""Load cookies from a file."""
if filename is None:
if self.filename is not None: