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_whiskyzone.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crawler/shop_whiskyzone.go') diff --git a/crawler/shop_whiskyzone.go b/crawler/shop_whiskyzone.go index c07c14f..8d86b8a 100644 --- a/crawler/shop_whiskyzone.go +++ b/crawler/shop_whiskyzone.go @@ -56,6 +56,15 @@ func ScrapeWhiskyzone(shop Shop) []Angebot { W.Volume = get_volume(e) W.Abv = get_abv(e) + if W.Volume == 0 { + DebugOffer(W, "Whiskyzone: Volume is zero") + return + } + if W.Abv == 0 { + DebugOffer(W, "Whiskyzone: Abv is zero") + return + } + base_price := e.Request.Ctx.Get("base_price") if base_price == "same_as_discounted_price" { W.Base_price = W.Discounted_price -- cgit v1.2.3