Update cookies.py

This commit is contained in:
H Lohaus 2024-04-22 09:21:17 +02:00 committed by GitHub
parent 4b4d1f08b5
commit 454be0ed70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

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