mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 22:54:27 -04:00
add chrome sandbox option
This commit is contained in:
parent
a6650dfca0
commit
6c6bdaa3d7
2 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,7 @@ from config import (
|
|||
FETCH_FAVICON,
|
||||
WGET_USER_AGENT,
|
||||
CHROME_USER_DATA_DIR,
|
||||
CHROME_SANDBOX,
|
||||
TIMEOUT,
|
||||
ANSI,
|
||||
ARCHIVE_DIR,
|
||||
|
@ -498,6 +499,8 @@ def fetch_favicon(link_dir, link, timeout=TIMEOUT):
|
|||
|
||||
def chrome_headless(binary=CHROME_BINARY, user_data_dir=CHROME_USER_DATA_DIR):
|
||||
args = [binary, '--headless'] # '--disable-gpu'
|
||||
if not CHROME_SANDBOX:
|
||||
args.append('--no-sandbox')
|
||||
default_profile = os.path.expanduser('~/Library/Application Support/Google/Chrome/Default')
|
||||
if user_data_dir:
|
||||
args.append('--user-data-dir={}'.format(user_data_dir))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue