Check expires_utc for 0 instead, works just the same

Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
pull/9747/head
Stefan Lobbenmeier 2024-04-20 19:37:13 +02:00 zatwierdzone przez GitHub
rodzic a17527c6fa
commit dc70bae66a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -347,9 +347,9 @@ def _process_chrome_cookie(decryptor, host_key, name, value, encrypted_value, pa
if value is None:
return is_encrypted, None
# In chrome, session cookies have has_expires and expires_utc set to 0
# In Python, cookies that do not expire have expires set to None
if not has_expires:
# In chrome, session cookies have expires_utc set to 0
# In our cookie-store, cookies that do not expire should have expires set to None
if not expires_utc:
expires_utc = None
return is_encrypted, http.cookiejar.Cookie(