Skip to content

A feature-rich command-line audio/video downloader

[cookies] Add `--cookies-from-browser` support for MS Store Firefox (#11731)

wesson09354cb4026cf2
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py
index 772433b0f2..fad323c901 100644
--- a/yt_dlp/cookies.py
+++ b/yt_dlp/cookies.py
@@ -195,7 +195,10 @@ def _extract_firefox_cookies(profile, container, logger):
def _firefox_browser_dirs():
if sys.platform in ('cygwin', 'win32'):
- yield os.path.expandvars(R'%APPDATA%\Mozilla\Firefox\Profiles')
+ yield from map(os.path.expandvars, (
+ R'%APPDATA%\Mozilla\Firefox\Profiles',
+ R'%LOCALAPPDATA%\Packages\Mozilla.Firefox_n80bbvh6b1yt2\LocalCache\Roaming\Mozilla\Firefox\Profiles',
+ ))
elif sys.platform == 'darwin':
yield os.path.expanduser('~/Library/Application Support/Firefox/Profiles')