615_import_firefox_session.py: Open database with immutable=1
Allows to open the firefox cookie database even though Firefox is holding a lock. Fixes the "Cookie import failed: database is locked" message when using the script while Firefox was running. This has been reported in #877.
This commit is contained in:
parent
610756d342
commit
dcc7ab89c1
@ -23,7 +23,7 @@ def get_cookiefile():
|
||||
|
||||
def import_session(cookiefile, sessionfile):
|
||||
print("Using cookies from {}.".format(cookiefile))
|
||||
conn = connect(cookiefile)
|
||||
conn = connect(f"file:{cookiefile}?immutable=1", uri=True)
|
||||
try:
|
||||
cookie_data = conn.execute(
|
||||
"SELECT name, value FROM moz_cookies WHERE baseDomain='instagram.com'"
|
||||
|
Loading…
Reference in New Issue
Block a user