Commit.
This commit is contained in:
parent
5bebac85fb
commit
8a196c25bd
|
@ -171,14 +171,14 @@ class Browser(DriverChoose):
|
|||
for i in option_arguments:
|
||||
options.add_argument(i)
|
||||
# Set headless mode.
|
||||
# if self.platform == 'Linux' or headless:
|
||||
# options.add_argument('--headless')
|
||||
if self.platform == 'Linux' or headless:
|
||||
options.add_argument('--headless')
|
||||
# Set no-sandbox mode.
|
||||
if self.platform == 'Linux':
|
||||
display = pyvirtualdisplay.Display(visible=False, size=(1920, 1080))
|
||||
display.start()
|
||||
options.add_argument('--no-sandbox')
|
||||
# options.add_argument('--disable-gpu')
|
||||
options.add_argument('--disable-gpu')
|
||||
# Set language of browser, default is zh-CN.
|
||||
if lang:
|
||||
options.add_argument('--lang=%s' % (lang or 'zh-CN'))
|
||||
|
|
Loading…
Reference in New Issue