From a418c52123969b01c37bafd67ec226410211cccf Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 8 Feb 2018 16:07:46 +0100 Subject: Crawler extracts volume, price per litre and abv. (bottleshop only) --- crawler/sanitize.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crawler/sanitize.go') diff --git a/crawler/sanitize.go b/crawler/sanitize.go index c86faff..fc4ee81 100644 --- a/crawler/sanitize.go +++ b/crawler/sanitize.go @@ -91,3 +91,11 @@ func sanitize_name(name string) string { return name } + +func sanitize_price_per(price_noisy string) (price int, err error) { + if strings.Contains(price_noisy, "Preis pro Liter") { + price_noisy = strings.Replace(price_noisy, "Preis pro Liter", "", -1) + } + + return convert_price(price_noisy) +} -- cgit v1.2.3