From ea99b69e87f9e1d5371fc7d9ce2a6a19dd7b29f5 Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Sat, 31 Jan 2026 11:34:50 -0600 Subject: [PATCH] Add better error handling for Firefox binary not found error --- scraper/scraper.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scraper/scraper.py b/scraper/scraper.py index f5eb0f3..8b9a57e 100644 --- a/scraper/scraper.py +++ b/scraper/scraper.py @@ -204,7 +204,13 @@ def get_article_with_selenium(url): return article.text except Exception as e: - logger.error(f"Selenium failed for {url}: {str(e)}") + # Check if this is a Firefox binary not found error + error_str = str(e).lower() + if "binary is not a firefox executable" in error_str or "firefox" in error_str: + logger.error(f"Firefox not found or not properly configured for {url}: {str(e)}") + logger.error("Please ensure Firefox is installed and properly configured in PATH") + else: + logger.error(f"Selenium failed for {url}: {str(e)}") return "" finally: # Always quit the driver