mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user