Skip to content

Commit

Permalink
fix(digitecgalaxus): Adjust API
Browse files Browse the repository at this point in the history
  • Loading branch information
gianklug committed Jul 28, 2023
1 parent 713970d commit 19863dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_digitec_deal(url):
# deal["new_price"] = soup.find("span", {"class": "sc-pr6hlf-1"}).text.replace(
# ".\u2013", ""
# )
deal.new_price = apidata[1]["price"]["amountIncl"]
deal.new_price = apidata[1]["price"]["amountInclusive"]
try:
# deal["old_price"] = (
# soup.find("span", {"class": "sc-pr6hlf-1"})
Expand All @@ -176,7 +176,7 @@ def get_digitec_deal(url):
# )
# if "cash" in deal["old_price"].lower():
# deal["old_price"] = "??"
deal.old_price = apidata[1]["insteadOfPrice"]["price"]["amountIncl"]
deal.old_price = apidata[1]["insteadOfPrice"]["price"]["amountInclusive"]
except:
deal.old_price = "??"
# matches = re.finditer(r"([0-9?]+\.([0-9?]{2}|–))", deal["old_price"])
Expand Down

0 comments on commit 19863dd

Please sign in to comment.