Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -94,8 +94,10 @@ def chrome(url:str=None,wait:int=5,header:str=None,cookie:str=None,cookie_domain
|
|
94 |
for key, value in cookie_array.items():
|
95 |
try:
|
96 |
if cookie_domain :
|
97 |
-
|
98 |
-
|
|
|
|
|
99 |
except Exception as e:
|
100 |
print("Error Cookie:")
|
101 |
print({"name": key, "value": quote(value), "domain": f'.{target_domain}', "path": "/"})
|
|
|
94 |
for key, value in cookie_array.items():
|
95 |
try:
|
96 |
if cookie_domain :
|
97 |
+
domain = cookie_domain
|
98 |
+
else:
|
99 |
+
domain = f'.{target_domain}'
|
100 |
+
driver.add_cookie({"name": key, "value": quote(value), "domain": domain, "path": "/"})
|
101 |
except Exception as e:
|
102 |
print("Error Cookie:")
|
103 |
print({"name": key, "value": quote(value), "domain": f'.{target_domain}', "path": "/"})
|