From 1c0e0f0fe112b872203951f6d870d0dd2b735150 Mon Sep 17 00:00:00 2001 From: Geoff-Robin Date: Mon, 6 Oct 2025 18:32:10 +0530 Subject: [PATCH] Solved more nitpick comments --- cognee/api/v1/add/add.py | 2 +- cognee/tasks/web_scraper/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cognee/api/v1/add/add.py b/cognee/api/v1/add/add.py index 3942fcf5f..c8720f33f 100644 --- a/cognee/api/v1/add/add.py +++ b/cognee/api/v1/add/add.py @@ -171,7 +171,7 @@ async def add( - TAVILY_API_KEY: YOUR_TAVILY_API_KEY """ - + if not soup_crawler_config and extraction_rules: soup_crawler_config = SoupCrawlerConfig(extraction_rules=extraction_rules) if not tavily_config and os.getenv("TAVILY_API_KEY"): diff --git a/cognee/tasks/web_scraper/utils.py b/cognee/tasks/web_scraper/utils.py index 28a19d69f..12d2338ef 100644 --- a/cognee/tasks/web_scraper/utils.py +++ b/cognee/tasks/web_scraper/utils.py @@ -50,9 +50,9 @@ async def fetch_page_content( raise ValueError("TAVILY_API_KEY must be set in TavilyConfig to use Tavily") return await fetch_with_tavily(urls, tavily_config) - elif preferred_tool == "beautifulsoup": + if preferred_tool == "beautifulsoup": try: - from bs4 import BeautifulSoup + from bs4 import BeautifulSoup as _ # noqa: F401 except ImportError: logger.error( "Failed to import bs4, make sure to install using pip install beautifulsoup4>=4.13.1"