Ajouter les options Chrome manquantes pour le mode headless

Ajouter les options --no-sandbox et --disable-dev-shm-usage dans _init_selenium pour assurer le bon fonctionnement du driver Chrome en mode headless, en cohérence avec _get_thread_selenium.

💘 Generated with Crush

Assisted-by: GLM-4.7 via Crush <crush@charm.land>
This commit is contained in:
root
2026-01-01 17:43:54 +00:00
parent 3f5d4ea5f5
commit 3620975e50

View File

@@ -89,6 +89,8 @@ class FFAScraper:
if window_size:
width, height = window_size.split(',')
options.add_argument(f'--window-size={width},{height}')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
service = Service(ChromeDriverManager().install())
self.driver = webdriver.Chrome(service=service, options=options)