diff options
author | Michael Pauley <mdpauley@gmail.com> | 2022-02-14 09:36:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 06:36:51 -0800 |
commit | 1f7db8533ad0cdb06ec521b17aa503134e94413f (patch) | |
tree | 7005510db188ca4ccfc3d9afa436b8122642c575 /yt_dlp/cookies.py | |
parent | e8969bda9412b8dc9f76da25ee7e5d9c46de8355 (diff) | |
download | hypervideo-pre-1f7db8533ad0cdb06ec521b17aa503134e94413f.tar.lz hypervideo-pre-1f7db8533ad0cdb06ec521b17aa503134e94413f.tar.xz hypervideo-pre-1f7db8533ad0cdb06ec521b17aa503134e94413f.zip |
[cookies] Update MacOS12 `Cookies.binarycookies` location (#2742)
Authored by: mdpauley
Diffstat (limited to 'yt_dlp/cookies.py')
-rw-r--r-- | yt_dlp/cookies.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py index fc033a8ae..7265cad81 100644 --- a/yt_dlp/cookies.py +++ b/yt_dlp/cookies.py @@ -454,7 +454,10 @@ def _extract_safari_cookies(profile, logger): cookies_path = os.path.expanduser('~/Library/Cookies/Cookies.binarycookies') if not os.path.isfile(cookies_path): - raise FileNotFoundError('could not find safari cookies database') + logger.debug('Trying secondary cookie location') + cookies_path = os.path.expanduser('~/Library/Containers/com.apple.Safari/Data/Library/Cookies/Cookies.binarycookies') + if not os.path.isfile(cookies_path): + raise FileNotFoundError('could not find safari cookies database') with open(cookies_path, 'rb') as f: cookies_data = f.read() |