Container commited on
Commit
a4fc0b4
·
verified ·
1 Parent(s): 70c1009

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -92,8 +92,8 @@ def chrome(url:str=None,wait:int=5,header:str=None,cookie:str=None):
92
  cookie_array = convert_cookies_to_dict(header_array['cookie'])
93
  del header_array['cookie']
94
  for key, value in cookie_array.items():
95
- print({"name": key, "value": value, "domain": f'.{target_domain}', "path": "/", "secure": False})
96
- # driver.add_cookie({"name": key, "value": value, "domain": f'.{target_domain}', "path": "/", "secure": False})
97
 
98
  # 把下次访问中的请求头修改成我们需要的样式(没有修改的项目则保持原样)
99
  driver.header_overrides = header_array
 
92
  cookie_array = convert_cookies_to_dict(header_array['cookie'])
93
  del header_array['cookie']
94
  for key, value in cookie_array.items():
95
+ print({"name": key, "value": value, "domain": f'.{target_domain}', "path": "/"})
96
+ driver.add_cookie({"name": key, "value": value, "domain": f'.{target_domain}', "path": "/"})
97
 
98
  # 把下次访问中的请求头修改成我们需要的样式(没有修改的项目则保持原样)
99
  driver.header_overrides = header_array