aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/cookies.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-06-24 13:40:17 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-06-25 00:08:55 +0530
commitac668111128b5f124b4271b3aa4c35f6e71a4749 (patch)
tree2a824880c707248076748070f7505cfb05200399 /yt_dlp/cookies.py
parent3c5386cd711a5a0480a0b8d72e9df5007b10ac92 (diff)
downloadhypervideo-pre-ac668111128b5f124b4271b3aa4c35f6e71a4749.tar.lz
hypervideo-pre-ac668111128b5f124b4271b3aa4c35f6e71a4749.tar.xz
hypervideo-pre-ac668111128b5f124b4271b3aa4c35f6e71a4749.zip
[compat] Remove more functions
Removing any more will require changes to a large number of extractors
Diffstat (limited to 'yt_dlp/cookies.py')
-rw-r--r--yt_dlp/cookies.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py
index a74701750..6811a7288 100644
--- a/yt_dlp/cookies.py
+++ b/yt_dlp/cookies.py
@@ -11,13 +11,14 @@ import time
from datetime import datetime, timedelta, timezone
from enum import Enum, auto
from hashlib import pbkdf2_hmac
+import http.cookiejar
from .aes import (
aes_cbc_decrypt_bytes,
aes_gcm_decrypt_and_verify_bytes,
unpad_pkcs7,
)
-from .compat import compat_b64decode, compat_cookiejar_Cookie
+from .compat import compat_b64decode
from .dependencies import (
_SECRETSTORAGE_UNAVAILABLE_REASON,
secretstorage,
@@ -142,7 +143,7 @@ def _extract_firefox_cookies(profile, logger):
total_cookie_count = len(table)
for i, (host, name, value, path, expiry, is_secure) in enumerate(table):
progress_bar.print(f'Loading cookie {i: 6d}/{total_cookie_count: 6d}')
- cookie = compat_cookiejar_Cookie(
+ cookie = http.cookiejar.Cookie(
version=0, name=name, value=value, port=None, port_specified=False,
domain=host, domain_specified=bool(host), domain_initial_dot=host.startswith('.'),
path=path, path_specified=bool(path), secure=is_secure, expires=expiry, discard=False,
@@ -297,7 +298,7 @@ def _process_chrome_cookie(decryptor, host_key, name, value, encrypted_value, pa
if value is None:
return is_encrypted, None
- return is_encrypted, compat_cookiejar_Cookie(
+ return is_encrypted, http.cookiejar.Cookie(
version=0, name=name, value=value, port=None, port_specified=False,
domain=host_key, domain_specified=bool(host_key), domain_initial_dot=host_key.startswith('.'),
path=path, path_specified=bool(path), secure=is_secure, expires=expires_utc, discard=False,
@@ -589,7 +590,7 @@ def _parse_safari_cookies_record(data, jar, logger):
p.skip_to(record_size, 'space at the end of the record')
- cookie = compat_cookiejar_Cookie(
+ cookie = http.cookiejar.Cookie(
version=0, name=name, value=value, port=None, port_specified=False,
domain=domain, domain_specified=bool(domain), domain_initial_dot=domain.startswith('.'),
path=path, path_specified=bool(path), secure=is_secure, expires=expiration_date, discard=False,