Understand the cookie extraction provider order
mainSweet Cookie follows a specific priority order when searching for cookies. This ensures that explicit, provided data is preferred over local browser data.
Inline Sources: If
inlineCookiesJson,inlineCookiesBase64, orinlineCookiesFileare provided, they are checked first. The first non-empty source wins. If an inline source is found, local browser stores are skipped. Note: If an inline source is provided but fails due to unsupported isolation, the library returns no cookies rather than falling back to local browsers.Local Browsers: If no inline source is valid, the library queries local browsers in the order declared in the
browsersoption:- Chrome: Uses
node:sqliteorbun:sqliteto query a copy of the DB. Decryption methods vary by OS (macOS Keychain, Windows DPAPI, Linux v10/v11 keyring). - Edge: Follows the Chromium decryption path for the current OS.
- Firefox: Uses
node:sqliteorbun:sqliteto querycookies.sqlite. - Safari: Parses
Cookies.binarycookiesfiles directly.
- Chrome: Uses