mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
Merge pull request #1123 from fa0311/dev
This commit is contained in:
commit
829e377890
1 changed files with 5 additions and 2 deletions
|
@ -219,7 +219,7 @@ def get_headers(url: str, timeout: int=None) -> str:
|
|||
def chrome_args(**options) -> List[str]:
|
||||
"""helper to build up a chrome shell command with arguments"""
|
||||
|
||||
from .config import CHROME_OPTIONS
|
||||
from .config import CHROME_OPTIONS, CHROME_VERSION
|
||||
|
||||
options = {**CHROME_OPTIONS, **options}
|
||||
|
||||
|
@ -229,7 +229,10 @@ def chrome_args(**options) -> List[str]:
|
|||
cmd_args = [options['CHROME_BINARY']]
|
||||
|
||||
if options['CHROME_HEADLESS']:
|
||||
cmd_args += ('--headless',)
|
||||
if int(CHROME_VERSION.split()[1].split('.')[0]) >= 111:
|
||||
cmd_args += ("--headless=new",)
|
||||
else:
|
||||
cmd_args += ('--headless',)
|
||||
|
||||
if not options['CHROME_SANDBOX']:
|
||||
# assume this means we are running inside a docker container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue