From 403bb7e2081690c0c0d408bfd2b79a4132a9e625 Mon Sep 17 00:00:00 2001 From: Mike Plachta Date: Tue, 26 Aug 2025 08:10:24 -0700 Subject: [PATCH] feat: add descriptive header to scraped website content output (#426) * feat: add descriptive header to scraped website content output * fix: correct typo in scraped website content header text --- .../tools/scrape_website_tool/scrape_website_tool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crewai_tools/tools/scrape_website_tool/scrape_website_tool.py b/src/crewai_tools/tools/scrape_website_tool/scrape_website_tool.py index 0e7e25ca6..bfb371275 100644 --- a/src/crewai_tools/tools/scrape_website_tool/scrape_website_tool.py +++ b/src/crewai_tools/tools/scrape_website_tool/scrape_website_tool.py @@ -65,7 +65,8 @@ class ScrapeWebsiteTool(BaseTool): page.encoding = page.apparent_encoding parsed = BeautifulSoup(page.text, "html.parser") - text = parsed.get_text(" ") + text = "The following text is scraped website content:\n\n" + text += parsed.get_text(" ") text = re.sub("[ \t]+", " ", text) text = re.sub("\\s+\n\\s+", "\n", text) return text