1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-07-04 10:57:58 +02:00

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:
Alexander Graf 2020-12-06 08:43:04 +01:00
parent 610756d342
commit dcc7ab89c1

View File

@ -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'"