diff options
Diffstat (limited to 'crawler/sanitize.go')
| -rw-r--r-- | crawler/sanitize.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crawler/sanitize.go b/crawler/sanitize.go index a40745a..7a2ff58 100644 --- a/crawler/sanitize.go +++ b/crawler/sanitize.go @@ -13,6 +13,29 @@ func sanitize_offer(angebote []Angebot) []Angebot { for _, offer := range angebote { offer.Name = sanitize_name(offer.Name) + if offer.Abv == 0 { + log.Println("sanitize.go: abv zero: " + offer.Name + "( " + offer.Url + ")") + continue + } + if offer.Volume == 0 { + log.Println("sanitize.go: volume zero: " + offer.Name + "( " + offer.Url + ")") + continue + } + if offer.Discounted_price == 0 { + log.Println("sanitize.go: discounted_price zero: " + offer.Name + "( " + offer.Url + ")") + continue + } + if offer.Original_price == 0 { + log.Println("sanitize.go: original_price zero: " + offer.Name + "( " + offer.Url + ")") + continue + } + if offer.Base_price == 0 { + log.Println("sanitize.go: base_price zero: " + offer.Name + "( " + offer.Url + ")") + continue + } + + //offer.Website = "" + W = append(W, offer) } |
