mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-25 05:30:23 +00:00
fix chrome headless=new arg
This commit is contained in:
parent
6ffa710bb3
commit
6c4f3fc83a
1 changed files with 1 additions and 5 deletions
|
@ -304,11 +304,7 @@ def chrome_args(**options) -> List[str]:
|
|||
cmd_args += CHROME_EXTRA_ARGS
|
||||
|
||||
if options['CHROME_HEADLESS']:
|
||||
chrome_major_version = int(re.search(r'\s(\d+)\.\d', CHROME_VERSION)[1])
|
||||
if chrome_major_version >= 111:
|
||||
cmd_args += ("--headless=new",)
|
||||
else:
|
||||
cmd_args += ('--headless',)
|
||||
cmd_args += ("--headless=new",) # expects chrome version >= 111
|
||||
|
||||
if not options['CHROME_SANDBOX']:
|
||||
# assume this means we are running inside a docker container
|
||||
|
|
Loading…
Reference in a new issue