mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
headless设置适配新版浏览器
This commit is contained in:
parent
c300d91073
commit
e1b3fbf850
@ -238,7 +238,7 @@ class ChromiumOptions(object):
|
|||||||
:param on_off: 开或关
|
:param on_off: 开或关
|
||||||
:return: 当前对象
|
:return: 当前对象
|
||||||
"""
|
"""
|
||||||
on_off = None if on_off else False
|
on_off = 'new' if on_off else False
|
||||||
return self.set_argument('--headless', on_off)
|
return self.set_argument('--headless', on_off)
|
||||||
|
|
||||||
def set_no_imgs(self, on_off=True):
|
def set_no_imgs(self, on_off=True):
|
||||||
|
@ -150,7 +150,7 @@ def set_headless(on_off=True, ini_path=None):
|
|||||||
:param ini_path: 要修改的ini文件路径
|
:param ini_path: 要修改的ini文件路径
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
on_off = None if on_off else False
|
on_off = 'new' if on_off else False
|
||||||
set_argument('--headless', on_off, ini_path)
|
set_argument('--headless', on_off, ini_path)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user