Skip to content

Commit

Permalink
Update cookies.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hlohaus authored Apr 22, 2024
1 parent 4b4d1f0 commit 454be0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions g4f/cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 454be0e

Please sign in to comment.