mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-13 10:04:31 +02:00
fix chrome headless=new arg
This commit is contained in:
@@ -304,11 +304,7 @@ def chrome_args(**options) -> List[str]:
|
|||||||
cmd_args += CHROME_EXTRA_ARGS
|
cmd_args += CHROME_EXTRA_ARGS
|
||||||
|
|
||||||
if options['CHROME_HEADLESS']:
|
if options['CHROME_HEADLESS']:
|
||||||
chrome_major_version = int(re.search(r'\s(\d+)\.\d', CHROME_VERSION)[1])
|
cmd_args += ("--headless=new",) # expects chrome version >= 111
|
||||||
if chrome_major_version >= 111:
|
|
||||||
cmd_args += ("--headless=new",)
|
|
||||||
else:
|
|
||||||
cmd_args += ('--headless',)
|
|
||||||
|
|
||||||
if not options['CHROME_SANDBOX']:
|
if not options['CHROME_SANDBOX']:
|
||||||
# assume this means we are running inside a docker container
|
# assume this means we are running inside a docker container
|
||||||
|
Reference in New Issue
Block a user