1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-07 09:09:57 +08:00

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
This commit is contained in:
Eduardo Trápani 2019-10-04 23:47:19 -03:00 committed by GitHub
parent 05446d483d
commit 01cc0f14d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):