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