mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
Reversed order of url validation
This commit is contained in:
@@ -100,14 +100,14 @@ class SpiderTool(BaseTool):
|
||||
params = {}
|
||||
url = website_url or self.website_url
|
||||
|
||||
if not self._validate_url(url):
|
||||
raise ValueError("Invalid URL format")
|
||||
|
||||
if not url:
|
||||
raise ValueError(
|
||||
"Website URL must be provided either during initialization or execution"
|
||||
)
|
||||
|
||||
if not self._validate_url(url):
|
||||
raise ValueError("Invalid URL format")
|
||||
|
||||
if mode not in ["scrape", "crawl"]:
|
||||
raise ValueError("Mode must be either 'scrape' or 'crawl'")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user