Solved more nitpick comments
This commit is contained in:
parent
d4ce340cb5
commit
1c0e0f0fe1
2 changed files with 3 additions and 3 deletions
|
|
@ -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"):
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue