browser_cookie3
browser_cookie3 copied to clipboard
Incorrect detection of Firefox in Linux
Was wondering why I could not find the cookie for a specific domain despite it being stored. I found out the issue was that self.cookie_file was the path to my Firefox Developer Edition so I changed the path to the correct Firefox and it worked.
class FirefoxBased:
"""Superclass for Firefox based browsers"""
def __init__(self, browser_name, cookie_file=None, domain_name="", **kwargs):
self.browser_name = browser_name
self.cookie_file = cookie_file or self.__find_cookie_file(**kwargs)
self.cookie_file = "/home/speckles/.mozilla/firefox/g5cxou3r.default-release-1715532506105/cookies.sqlite" # TODO: Remove this!!!!!!
Perhaps its something to do with __expand_and_check_path in the same class as it returns the first result? edit: yeah it does seem like it imo
i use arch btw
Experiencing the same on NixOS.
I have a bunch of profiles laying around but they're not the default. browser_cookie3 should use the default profile as selected in Firefox.
I had to add my desired profile manually at `` line ~913
elif sys.platform.startswith('linux') or 'bsd' in sys.platform.lower():
user_data_path = self.__expand_and_check_path(linux_data_dirs)
user_data_path += '/voyqppej.default-release-3'
elif sys.platform == 'win32':
Maybe the containing function should allow optional profile name (much like the domain)
I experienced the same issue, and I was also able to fix it by manually defining self.cookie_file. So I assume there must be a bug in function __expand_and_check_path.