summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g4f/cookies.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/g4f/cookies.py b/g4f/cookies.py
index efd6e969..4f0899b4 100644
--- a/g4f/cookies.py
+++ b/g4f/cookies.py
@@ -111,6 +111,9 @@ def read_cookie_files(dirPath: str = "./har_and_cookies"):
for v in harFile['log']['entries']:
v_cookies = {}
for c in v['request']['cookies']:
+ if "domain" not in c:
+ continue
+
if c['domain'] not in v_cookies:
v_cookies[c['domain']] = {}
v_cookies[c['domain']][c['name']] = c['value']