From 2c36263ad49f752cc68802ea0bad0f3b06bbe82c Mon Sep 17 00:00:00 2001 From: Matthew Broadway Date: Fri, 5 Dec 2025 12:13:52 +0000 Subject: [PATCH] add firefox XDG directory to search paths --- yt_dlp/cookies.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py index 8e0c45ade7..35cb38f7a9 100644 --- a/yt_dlp/cookies.py +++ b/yt_dlp/cookies.py @@ -234,13 +234,16 @@ def _firefox_based_browser_settings(browser_name): else: flatpak_root = os.path.expanduser('~/.var/app') snap_root = os.path.expanduser('~/snap') + config = _config_home() browser_dirs = { 'firefox': [ + os.path.join(config, 'mozilla/firefox'), os.path.expanduser('~/.mozilla/firefox'), os.path.join(flatpak_root, 'org.mozilla.firefox/.mozilla/firefox'), os.path.join(snap_root, 'firefox/common/.mozilla/firefox'), ], 'librewolf': [ + # librewolf does not follow the XDG specification yet: https://codeberg.org/librewolf/issues/issues/2682 os.path.expanduser('~/.librewolf'), os.path.join(flatpak_root, 'io.gitlab.librewolf-community/.librewolf'), # not published on snapcraft