Skip to content

Commit 9957f6b

Browse files
committed
Improve anti-detection measures for Selenium bots
1 parent c3f1db1 commit 9957f6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ def _set_chrome_options(
646646
chrome_options.add_argument("--remote-debugging-port=9222")
647647
if swiftshader:
648648
chrome_options.add_argument("--use-gl=swiftshader")
649-
else:
649+
elif not is_using_uc(undetectable, browser_name):
650650
chrome_options.add_argument("--disable-gpu")
651651
if "linux" in PLATFORM:
652652
chrome_options.add_argument("--disable-dev-shm-usage")
@@ -673,7 +673,7 @@ def _set_chrome_options(
673673
chrome_options.add_argument("--disable-prompt-on-repost")
674674
chrome_options.add_argument("--dns-prefetch-disable")
675675
chrome_options.add_argument("--disable-translate")
676-
if not enable_3d_apis:
676+
if not enable_3d_apis and not is_using_uc(undetectable, browser_name):
677677
chrome_options.add_argument("--disable-3d-apis")
678678
if headless or headless2 or is_using_uc(undetectable, browser_name):
679679
chrome_options.add_argument("--disable-renderer-backgrounding")

0 commit comments

Comments
 (0)