aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsepro <sepro@sepr0.com>2024-09-25 23:13:54 +0200
committerGitHub <noreply@github.com>2024-09-25 23:13:54 +0200
commitb397a64691421ace5df09457c2a764821a2dc6f2 (patch)
tree9aa725a76d127e7a3d5285a87ebddbf21ea81f96
parent5bb1aa04dafce13ba9de707ea53169fab58b5207 (diff)
[cookies] Improve error message for Windows `--cookies-from-browser chrome` issue (#11090)
Authored by: seproDev
-rw-r--r--yt_dlp/cookies.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py
index 070d2fcb9..cff8d74a7 100644
--- a/yt_dlp/cookies.py
+++ b/yt_dlp/cookies.py
@@ -1053,8 +1053,9 @@ def _decrypt_windows_dpapi(ciphertext, logger):
ctypes.byref(blob_out), # pDataOut
)
if not ret:
- logger.warning('failed to decrypt with DPAPI', only_once=True)
- return None
+ message = 'Failed to decrypt with DPAPI. See https://github.com/yt-dlp/yt-dlp/issues/10927 for more info'
+ logger.error(message)
+ raise DownloadError(message) # force exit
result = ctypes.string_at(blob_out.pbData, blob_out.cbData)
ctypes.windll.kernel32.LocalFree(blob_out.pbData)