From 19863dd1e0e1eebaeb419ac5f1ff9ea83e2d88f0 Mon Sep 17 00:00:00 2001 From: Gian Klug Date: Fri, 28 Jul 2023 17:48:18 +0200 Subject: [PATCH] fix(digitecgalaxus): Adjust API --- backend/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api.py b/backend/api.py index 6047db8..2a1651e 100755 --- a/backend/api.py +++ b/backend/api.py @@ -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"}) @@ -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"])