微调cookies添加功能

Signed-off-by: g1879 <g1879@qq.com>
This commit is contained in:
g1879 2023-03-24 10:01:25 +00:00 committed by Gitee
parent ec42be7a2f
commit 1c5c38b651
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -273,13 +273,13 @@ def set_browser_cookies(page, cookies):
cookie['domain'] = d
page.run_cdp_loaded('Network.setCookie', **cookie)
if is_cookie_in_driver(page, cookie):
continue
break
d = f'{".".join(d_list[i:])}'
cookie['domain'] = d
page.run_cdp_loaded('Network.setCookie', **cookie)
if is_cookie_in_driver(page, cookie):
continue
break
def is_cookie_in_driver(page, cookie):