Add get/set cookies dir, hide prompt option in gui

This commit is contained in:
Heiner Lohaus 2024-05-18 23:13:57 +02:00
parent 96e378e9e2
commit 9ddac1715f
12 changed files with 139 additions and 174 deletions

View file

@ -12,6 +12,7 @@ from copy import deepcopy
from .crypt import decrypt, encrypt
from ...requests import StreamSession
from ...cookies import get_cookies_dir
from ... import debug
class NoValidHarFileError(Exception):
@ -36,17 +37,14 @@ proofTokens: list = []
def readHAR():
global proofTokens
dirPath = "./"
harPath = []
chatArks = []
accessToken = None
cookies = {}
for root, dirs, files in os.walk(dirPath):
for root, dirs, files in os.walk(get_cookies_dir()):
for file in files:
if file.endswith(".har"):
harPath.append(os.path.join(root, file))
if harPath:
break
if not harPath:
raise NoValidHarFileError("No .har file found")
for path in harPath: