mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 15:22:37 +00:00
update basetool dependencies to use root crewai repo
This commit is contained in:
@@ -4,10 +4,9 @@ from typing import Any, Optional, Type
|
||||
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
from crewai.tools import BaseTool
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from ..base_tool import BaseTool
|
||||
|
||||
|
||||
class FixedScrapeWebsiteToolSchema(BaseModel):
|
||||
"""Input for ScrapeWebsiteTool."""
|
||||
@@ -69,6 +68,6 @@ class ScrapeWebsiteTool(BaseTool):
|
||||
parsed = BeautifulSoup(page.text, "html.parser")
|
||||
|
||||
text = parsed.get_text(" ")
|
||||
text = re.sub('[ \t]+', ' ', text)
|
||||
text = re.sub('\\s+\n\\s+', '\n', text)
|
||||
text = re.sub("[ \t]+", " ", text)
|
||||
text = re.sub("\\s+\n\\s+", "\n", text)
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user