summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorus2018-05-19 00:14:43 +0200
committerhorus2018-05-19 00:14:43 +0200
commitc12e03d791d370555ea6076c8e76c731cc47e94f (patch)
tree784ad836901629b621af470d34c7540de7b4868a
parent0117d808210f78a3861f9ccea3b6b4fccb8d979f (diff)
downloadalkobote-c12e03d791d370555ea6076c8e76c731cc47e94f.tar.gz
Bugfix. (crawler)
-rw-r--r--crawler/main.go3
-rw-r--r--crawler/sanitize.go2
2 files changed, 3 insertions, 2 deletions
diff --git a/crawler/main.go b/crawler/main.go
index bfcd647..a58310a 100644
--- a/crawler/main.go
+++ b/crawler/main.go
@@ -67,7 +67,8 @@ func main() {
}
// prints all crawlable shops
- if "true" == flag.Lookup("shops").Value.String() {
+ _flag := flag.Lookup("shops")
+ if _flag != nil && "true" == _flag.Value.String() {
log.SetLevel(log.InfoLevel)
for _, shop := range shops {
log.WithFields(
diff --git a/crawler/sanitize.go b/crawler/sanitize.go
index e1c6e84..e0b744e 100644
--- a/crawler/sanitize.go
+++ b/crawler/sanitize.go
@@ -55,7 +55,7 @@ func sanitize_offer(angebote []Angebot, shop Shop, try int) []Angebot {
}
if len(W) < 1 {
- log.Warn(fmt.Sprintf(`Sanitizer: No results for shop: "s%" (%d.) try`, shop.Name, try))
+ log.Warn(fmt.Sprintf(`Sanitizer: No results for shop: "%s" (%d.) try`, shop.Name, try))
}
return W