Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,20 +5,10 @@ import pandas as pd
|
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
-
@tool
|
9 |
-
name="amazon_product_scraper",
|
10 |
-
description="Scrapes Amazon search results for product titles, prices, delivery fees, and links, then returns a sorted list of products based on price.",
|
11 |
-
arguments=[
|
12 |
-
{"name": "search_url", "type": "str", "description": "The URL of the Amazon search results page."}
|
13 |
-
],
|
14 |
-
outputs=[
|
15 |
-
{"name": "products", "type": "list", "description": "A list of dictionaries with product details sorted by price."},
|
16 |
-
{"name": "recommendation", "type": "str", "description": "The best deal based on price and delivery fees."}
|
17 |
-
]
|
18 |
-
)
|
19 |
def amazon_product_scraper(search_url: str) -> list:
|
20 |
"""
|
21 |
-
|
22 |
|
23 |
Args:
|
24 |
search_url (str): The URL of the Amazon search results page. This should be a valid Amazon search URL containing product listings.
|
|
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
+
@tool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
def amazon_product_scraper(search_url: str) -> list:
|
10 |
"""
|
11 |
+
A tool that scrapes Amazon search results for product titles, prices, delivery fees, and links.
|
12 |
|
13 |
Args:
|
14 |
search_url (str): The URL of the Amazon search results page. This should be a valid Amazon search URL containing product listings.
|