SilviuMatei commited on
Commit
f759625
·
verified ·
1 Parent(s): 988f727

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -10,11 +10,13 @@ def amazon_product_scraper(search_url: str) -> tuple[pd.DataFrame, str]:
10
  """
11
  Scrapes Amazon search results for product titles, prices, delivery fees, and links.
12
 
13
- Arguments:
14
- search_url (str): The URL of the Amazon search results page.
15
 
16
  Returns:
17
- tuple[pd.DataFrame, str]: A tuple containing a sorted Pandas DataFrame of products and a recommendation string.
 
 
18
  """
19
  headers = {
20
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
 
10
  """
11
  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.
15
 
16
  Returns:
17
+ tuple[pd.DataFrame, str]: A tuple containing:
18
+ - A Pandas DataFrame with columns: Title, Price, Delivery, Link, sorted by price.
19
+ - A recommendation string for the best deal.
20
  """
21
  headers = {
22
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"