From c12e03d791d370555ea6076c8e76c731cc47e94f Mon Sep 17 00:00:00 2001 From: horus Date: Sat, 19 May 2018 00:14:43 +0200 Subject: Bugfix. (crawler) --- crawler/main.go | 3 ++- crawler/sanitize.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'crawler') 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 -- cgit v1.2.3