Skip to content

Commit

Permalink
Update amazon.py
Browse files Browse the repository at this point in the history
Corrected the HTML class of price information
  • Loading branch information
yasharya2901 authored Dec 2, 2023
1 parent ba26ae3 commit 00fe4b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amazon.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, url):

if self.__check_if_product_exists(product_html_element):
self.name = product_html_element.text.strip()
self.price = soup.find('span', class_="a-size-base a-color-price a-color-price").text
self.price = soup.find('span', class_="a-price-whole").text

else:
sys.exit("Unable to get the product. Please check the URL and try again.")
Expand Down

0 comments on commit 00fe4b1

Please sign in to comment.