summaryrefslogtreecommitdiff
path: root/crawler/sanitize.go
diff options
context:
space:
mode:
authorhorus2019-05-07 16:04:41 +0200
committerhorus2019-05-07 16:04:41 +0200
commita347c584e0e650219d71941990302c4be558da22 (patch)
tree0842697207c5cd744d3c0964f870f791590d96a7 /crawler/sanitize.go
parent21fa504804b35e689adcb89c483ae2a8deb82d83 (diff)
downloadalkobote-a347c584e0e650219d71941990302c4be558da22.tar.gz
Better spirit type detection. (crawler)
Diffstat (limited to 'crawler/sanitize.go')
-rw-r--r--crawler/sanitize.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/crawler/sanitize.go b/crawler/sanitize.go
index 48a7b55..2cc839c 100644
--- a/crawler/sanitize.go
+++ b/crawler/sanitize.go
@@ -16,6 +16,11 @@ func sanitize_offer(angebote []Angebot, shop Shop, try int) []Angebot {
for _, offer := range angebote {
+ if offer.Spirit_type == "Wein" {
+ DebugOffer(offer, "Sanitizer: Skip offer because it's wine")
+ continue
+ }
+
offer.Name = sanitize_name(offer.Name)
if offer.Age == 0 {
@@ -57,7 +62,12 @@ func sanitize_offer(angebote []Angebot, shop Shop, try int) []Angebot {
continue
}
- //offer.Website = ""
+ // Otherwise the database explodes.
+ offer.Website = ""
+
+ if offer.Age == 0 {
+ DebugOffer(offer, "GREP")
+ }
W = append(W, offer)
}