From 01cc0f14d79f4303715e5738184113138b4e7c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Tr=C3=A1pani?= Date: Fri, 4 Oct 2019 23:47:19 -0300 Subject: [PATCH] Reread cookies before overwriting the cookiejar Read cookies from file, merging with the ones in memory, right before writing them out again. It is a temporary fix for #22613 --- youtube_dl/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 798757241..0aaba08e4 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -2733,6 +2733,7 @@ class YoutubeDLCookieJar(compat_cookiejar.MozillaCookieJar): for cookie in self: if cookie.expires is None: cookie.expires = 0 + compat_cookiejar.MozillaCookieJar.load(self, filename, ignore_discard, ignore_expires) compat_cookiejar.MozillaCookieJar.save(self, filename, ignore_discard, ignore_expires) def load(self, filename=None, ignore_discard=False, ignore_expires=False):