diff options
| author | horus | 2018-02-16 18:06:50 +0100 |
|---|---|---|
| committer | horus | 2018-02-16 18:06:50 +0100 |
| commit | bf5f6b98a1d933d5f0ffb7fe965428f4dab5e3b0 (patch) | |
| tree | c95eb6426b61965b37da2b60da36cfe2c02a92b4 /crawler/shop_whiskyzone.go | |
| parent | ed6ab4da59f80bf9fa2cbf15da5c9167dff44ea4 (diff) | |
| download | alkobote-bf5f6b98a1d933d5f0ffb7fe965428f4dab5e3b0.tar.gz | |
Structured logging part two. (crawler)
Diffstat (limited to 'crawler/shop_whiskyzone.go')
| -rw-r--r-- | crawler/shop_whiskyzone.go | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
