From 454be0ed70c730dba13342156c15aea2ba31647a Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Mon, 22 Apr 2024 09:21:17 +0200 Subject: Update cookies.py --- g4f/cookies.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'g4f') 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'] -- cgit v1.2.3