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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -92,7 +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
- driver.add_cookie({"name": key, "value": value, "domain": f'.{target_domain}', "path": "/", "secure": False})
 
96
 
97
  # 把下次访问中的请求头修改成我们需要的样式(没有修改的项目则保持原样)
98
  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": "/", "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