diff options
| -rw-r--r-- | crawler/main.go | 3 | ||||
| -rw-r--r-- | crawler/sanitize.go | 2 |
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 |
