Update savehar.py
Use `.get` when retrieving "path" from the `attrs` cookie dict. This avoids the occasional `KeyError`.
This commit is contained in:
parent
d6986d43cd
commit
ad4ac04d2f
|
@ -281,7 +281,7 @@ class SaveHar:
|
||||||
cookie = {
|
cookie = {
|
||||||
"name": name,
|
"name": name,
|
||||||
"value": value,
|
"value": value,
|
||||||
"path": attrs["path"],
|
"path": attrs.get("path", "/"),
|
||||||
"domain": attrs.get("domain", ""),
|
"domain": attrs.get("domain", ""),
|
||||||
"httpOnly": "httpOnly" in attrs,
|
"httpOnly": "httpOnly" in attrs,
|
||||||
"secure": "secure" in attrs,
|
"secure": "secure" in attrs,
|
||||||
|
|
Loading…
Reference in New Issue