Skip to content

Commit

Permalink
Bugfix: Convert UUID to string
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjan-mohanty committed Mar 21, 2024
1 parent 8b43335 commit 3919787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amazon_product_details_scraper/core/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_product_detail(url):
soup = BeautifulSoup(response.content, "html.parser")

asin_element = soup.find("input", id="ASIN")
id = asin_element["value"] if asin_element else uuid.uuid4()
id = asin_element["value"] if asin_element else str(uuid.uuid4())

title_element = soup.find("span", id="productTitle")
title = title_element.text.strip() if title_element else None
Expand Down

0 comments on commit 3919787

Please sign in to comment.