From 8b1851eeb16cd88063394205ba2b893090a69db9 Mon Sep 17 00:00:00 2001 From: Eduard Tykhoniuk <50710486+MAKMED1337@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:30:35 +0100 Subject: [PATCH] Fix headless=false stalling --- src/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils.py b/src/utils.py index a5bd1ef..384e56f 100644 --- a/src/utils.py +++ b/src/utils.py @@ -6,6 +6,7 @@ import shutil import urllib.parse import tempfile import sys +import platform from selenium.webdriver.chrome.webdriver import WebDriver import undetected_chromedriver as uc @@ -135,8 +136,11 @@ def get_webdriver(proxy: dict = None) -> WebDriver: # this option removes the zygote sandbox (it seems that the resolution is a bit faster) options.add_argument('--no-zygote') # attempt to fix Docker ARM32 build - options.add_argument('--disable-gpu-sandbox') - options.add_argument('--disable-software-rasterizer') + IS_ARMARCH = platform.machine().startswith(('arm', 'aarch')) + if IS_ARMARCH: + options.add_argument('--disable-gpu-sandbox') + options.add_argument('--disable-software-rasterizer') + options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-ssl-errors') # fix GL errors in ASUSTOR NAS