Spaces:
Sleeping
Sleeping
Update firecrawler.py
Browse files- firecrawler.py +3 -3
firecrawler.py
CHANGED
|
@@ -17,14 +17,14 @@ class FireCrawlTool(Tool):
|
|
| 17 |
inputs = {
|
| 18 |
"websites": {
|
| 19 |
"type": "string",
|
| 20 |
-
"description": "A singlular or multiple website addresses
|
| 21 |
}
|
| 22 |
}
|
| 23 |
|
| 24 |
output_type = "string"
|
| 25 |
|
| 26 |
|
| 27 |
-
def forward(self,
|
| 28 |
|
| 29 |
# Initialize the FirecrawlApp with the API key
|
| 30 |
app = FirecrawlApp(api_key = api_key)
|
|
@@ -33,7 +33,7 @@ class FireCrawlTool(Tool):
|
|
| 33 |
# Split by commas, newlines, or spaces and strip whitespace
|
| 34 |
websites_list = [
|
| 35 |
website.strip()
|
| 36 |
-
for website in
|
| 37 |
if website.strip()
|
| 38 |
]
|
| 39 |
|
|
|
|
| 17 |
inputs = {
|
| 18 |
"websites": {
|
| 19 |
"type": "string",
|
| 20 |
+
"description": "A singlular or multiple website addresses",
|
| 21 |
}
|
| 22 |
}
|
| 23 |
|
| 24 |
output_type = "string"
|
| 25 |
|
| 26 |
|
| 27 |
+
def forward(self, websites: str):
|
| 28 |
|
| 29 |
# Initialize the FirecrawlApp with the API key
|
| 30 |
app = FirecrawlApp(api_key = api_key)
|
|
|
|
| 33 |
# Split by commas, newlines, or spaces and strip whitespace
|
| 34 |
websites_list = [
|
| 35 |
website.strip()
|
| 36 |
+
for website in websites.replace(',', ' ').replace('\n', ' ').split()
|
| 37 |
if website.strip()
|
| 38 |
]
|
| 39 |
|