diff --git a/dealfront_enrichment.py b/dealfront_enrichment.py index 2d5f1762..cd567572 100644 --- a/dealfront_enrichment.py +++ b/dealfront_enrichment.py @@ -31,9 +31,16 @@ class DealfrontScraper: """ logger.info("Initialisiere den DealfrontScraper und den Chrome WebDriver.") chrome_options = ChromeOptions() - # Optional: Führen Sie den Browser im "headless" Modus aus (ohne sichtbares Fenster) - # chrome_options.add_argument("--headless") + + # Docker-optimierte und Headless-Argumente + chrome_options.add_argument("--headless") + chrome_options.add_argument("--no-sandbox") + chrome_options.add_argument("--disable-dev-shm-usage") chrome_options.add_argument("--window-size=1920,1080") + + chrome_options.add_argument("--disable-blink-features=AutomationControlled") + chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"]) + chrome_options.add_experimental_option('useAutomationExtension', False) chrome_options.add_argument("--disable-blink-features=AutomationControlled") chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"]) chrome_options.add_experimental_option('useAutomationExtension', False)