borisbabic / browser_cookie3

This is a fork of browser_cookie
GNU Lesser General Public License v3.0
854 stars 144 forks source link

Chromium Linux cookies path does not include Snap Chromium path #208

Open Tuupertunut opened 5 months ago

Tuupertunut commented 5 months ago

Ubuntu 22.04 downloads Chromium from Snap Store by default. The Snap version of Chromium stores its cookies in ~/snap/chromium/common/chromium/Default/Cookies.

https://github.com/borisbabic/browser_cookie3/blob/53fa5e30a86216ca2064b129b259fa87509b03dd/browser_cookie3/__init__.py#L630-L640

Looking at the code, it seems that that Snap path is missing. Similar fix has been made for Snap Firefox before in PR #134. The relevant Firefox code looks like this:

https://github.com/borisbabic/browser_cookie3/blob/53fa5e30a86216ca2064b129b259fa87509b03dd/browser_cookie3/__init__.py#L986-L994