summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crawler/shop_drankdozijn.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/crawler/shop_drankdozijn.go b/crawler/shop_drankdozijn.go
index 8cf18ba..ed82792 100644
--- a/crawler/shop_drankdozijn.go
+++ b/crawler/shop_drankdozijn.go
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
+ "math"
"net/http"
//"strings"
@@ -187,13 +188,6 @@ func (app *App) ScrapeDrankdozijn(shop Shop) []Angebot {
panic(err)
}
- W.Base_price, err = convert_price(d12_product.FormatedPrice)
- if err != nil {
- // TODO
- log.Println("converting price from product_details failed")
- panic(err)
- }
-
for _, v := range d12_product.Features {
if v.Description == "Alkoholgehalt" {
W.Abv, err = extract_abv(v.Value.Description)
@@ -280,6 +274,8 @@ func (app *App) ScrapeDrankdozijn(shop Shop) []Angebot {
}
}
+ W.Base_price = int(math.Round(float64(W.Discounted_price) / float64(W.Volume)))
+
//W.Debug("DEBUG OFFER")
if W.Abv == 0 {
W.Println("Drankdozijn: Abv is zero")