Skip to content

Commit b5c1c35

Browse files
committed
FIX: Case system darwin add --no-sandbox
1 parent e291739 commit b5c1c35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

botcity/web/browsers/undetected_chrome.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import atexit
22
import json
33
import os
4+
import platform
45
import tempfile
56
from typing import Dict
67

@@ -64,7 +65,7 @@ def default_options(headless=False, download_folder_path=None, user_data_dir=Non
6465
# Check if user is root
6566
try:
6667
# This is only valid with Unix
67-
if os.geteuid() == 0:
68+
if os.geteuid() == 0 or platform.system() == 'Darwin':
6869
chrome_options.add_argument("--no-sandbox")
6970
except AttributeError:
7071
pass

0 commit comments

Comments
 (0)