mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-21 21:57:26 +02:00
Merge pull request #1199 from overhacked/chrome_version_detection_fix
This commit is contained in:
@@ -229,7 +229,8 @@ def chrome_args(**options) -> List[str]:
|
|||||||
cmd_args = [options['CHROME_BINARY']]
|
cmd_args = [options['CHROME_BINARY']]
|
||||||
|
|
||||||
if options['CHROME_HEADLESS']:
|
if options['CHROME_HEADLESS']:
|
||||||
if int(CHROME_VERSION.split()[1].split('.')[0]) >= 111:
|
chrome_major_version = int(re.search(r'\s(\d+)\.\d', CHROME_VERSION)[1])
|
||||||
|
if chrome_major_version >= 111:
|
||||||
cmd_args += ("--headless=new",)
|
cmd_args += ("--headless=new",)
|
||||||
else:
|
else:
|
||||||
cmd_args += ('--headless',)
|
cmd_args += ('--headless',)
|
||||||
|
Reference in New Issue
Block a user