From bf5f6b98a1d933d5f0ffb7fe965428f4dab5e3b0 Mon Sep 17 00:00:00 2001 From: horus Date: Fri, 16 Feb 2018 18:06:50 +0100 Subject: Structured logging part two. (crawler) --- crawler/shop_rumundco.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crawler/shop_rumundco.go') diff --git a/crawler/shop_rumundco.go b/crawler/shop_rumundco.go index e1516ba..25b89bd 100644 --- a/crawler/shop_rumundco.go +++ b/crawler/shop_rumundco.go @@ -95,7 +95,7 @@ func ScrapeRumundCo(shop Shop) []Angebot { W.Volume = get_volume(e) if W.Volume == 0 { - PrintlnOffer(W, "Rum & Co: No Volume found") + DebugOffer(W, "Rum & Co: Volume is zero") return } @@ -107,6 +107,10 @@ func ScrapeRumundCo(shop Shop) []Angebot { Fatal(err, "Rum & Co: Base price: Extracting ABV failed") } } + if W.Abv == 0 { + DebugOffer(W, "Rum & Co: Abv is zero") + return + } W.Shop = shop.Id W.Spirit_type = "Whisky" -- cgit v1.2.3