Problem
Safari (macOS Sonoma 14+) supports multiple profiles, each with isolated cookies. get-cookie explicitly ignores --profile for Safari and reads only the single default container path, so profile cookies are unreachable. Notably, yt-dlp does not support this either — implementing it would put get-cookie ahead of the reference.
Location:
src/core/browsers/safari/SafariCookieQueryStrategy.ts:44-55 (single hardcoded path)
src/core/browsers/safari/SafariCookieQueryStrategy.ts:500-503 (warns the profile is ignored)
Found in: yt-dlp cross-reference + WebSearch (codebase scan)
Type: enhancement (investigation required)
Context
// single path only
return join(home, "Library", "Containers", "com.apple.Safari", "Data", "Library", "Cookies", "Cookies.binarycookies");
// profile explicitly ignored at query time
this.logger.warn(`Safari does not support profile filtering. --profile "${this.profileName}" will be ignored; all Safari cookies will be returned.`);
Research Findings
- Safari cookies are known to live at
~/Library/Cookies/Cookies.binarycookies and ~/Library/Containers/com.apple.Safari/Data/Library/Cookies/Cookies.binarycookies.
- The per-profile storage layout (Sonoma+) is under-documented publicly; an investigation step is required (enumerate container subpaths; identify per-profile
*.binarycookies).
- References:
- Complexity: Medium–Complex (discovery first).
Recommended Approach
- Investigate the on-disk layout of Safari profile cookies on Sonoma/Sequoia (enumerate Safari container subdirectories; locate per-profile
*.binarycookies).
- Add Safari to
--list-profiles enumeration once the layout is known.
- Map
--profile <name|uuid> to the corresponding binarycookies file; default to the current container path.
- Replace the "not supported" warning with real filtering when a profile is supplied.
- Tests/fixtures for ≥2 Safari profiles.
Acceptance Criteria
Problem
Safari (macOS Sonoma 14+) supports multiple profiles, each with isolated cookies. get-cookie explicitly ignores
--profilefor Safari and reads only the single default container path, so profile cookies are unreachable. Notably, yt-dlp does not support this either — implementing it would put get-cookie ahead of the reference.Location:
src/core/browsers/safari/SafariCookieQueryStrategy.ts:44-55(single hardcoded path)src/core/browsers/safari/SafariCookieQueryStrategy.ts:500-503(warns the profile is ignored)Found in: yt-dlp cross-reference + WebSearch (codebase scan)
Type: enhancement (investigation required)
Context
Research Findings
~/Library/Cookies/Cookies.binarycookiesand~/Library/Containers/com.apple.Safari/Data/Library/Cookies/Cookies.binarycookies.*.binarycookies).Recommended Approach
*.binarycookies).--list-profilesenumeration once the layout is known.--profile <name|uuid>to the corresponding binarycookies file; default to the current container path.Acceptance Criteria
--profileselects the matching profile's cookies for Safari.--list-profilesincludes Safari profiles (if discoverable).