diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2023-08-12 16:30:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 21:30:23 +0000 |
commit | dab87ca23650fd87184ff5286b53e6985b59f71d (patch) | |
tree | 2f93071dd037e6eb47c12c09707fe7bb92b1e442 | |
parent | 378ae9f9fb8e8c86e6ac89c4c5b815b48ce93620 (diff) | |
download | hypervideo-pre-dab87ca23650fd87184ff5286b53e6985b59f71d.tar.lz hypervideo-pre-dab87ca23650fd87184ff5286b53e6985b59f71d.tar.xz hypervideo-pre-dab87ca23650fd87184ff5286b53e6985b59f71d.zip |
[cookies] Containers JSON should be opened as utf-8 (#7800)
Closes #7797
Authored by: bashonly
-rw-r--r-- | yt_dlp/cookies.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py index 157f5b0c2..a71fbc28b 100644 --- a/yt_dlp/cookies.py +++ b/yt_dlp/cookies.py @@ -138,7 +138,7 @@ def _extract_firefox_cookies(profile, container, logger): containers_path = os.path.join(os.path.dirname(cookie_database_path), 'containers.json') if not os.path.isfile(containers_path) or not os.access(containers_path, os.R_OK): raise FileNotFoundError(f'could not read containers.json in {search_root}') - with open(containers_path) as containers: + with open(containers_path, encoding='utf8') as containers: identities = json.load(containers).get('identities', []) container_id = next((context.get('userContextId') for context in identities if container in ( context.get('name'), |