diff options
| author | Maximilian Möhring | 2019-05-14 17:35:18 +0200 |
|---|---|---|
| committer | Maximilian Möhring | 2019-05-14 17:35:18 +0200 |
| commit | a2d595423e4270d8e644212021ba70c70df075d9 (patch) | |
| tree | a4d7f32400266a47b37d612babf9aa807c93f31d /crawler/shop_whic.go | |
| parent | 64520ffa7b66f6914decf50c43c8698ce47ee1ce (diff) | |
| download | alkobote-a2d595423e4270d8e644212021ba70c70df075d9.tar.gz | |
Refactores logging functions. (crawler)
Diffstat (limited to 'crawler/shop_whic.go')
| -rw-r--r-- | crawler/shop_whic.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawler/shop_whic.go b/crawler/shop_whic.go index 93bff23..b21c042 100644 --- a/crawler/shop_whic.go +++ b/crawler/shop_whic.go @@ -39,7 +39,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot { if err != nil { W.error_msg = err.Error() W.error_ctx = e.ChildText(".price") - PrintlnOffer(W, "Whic: Converting original price failed") + W.Println("Whic: Converting original price failed") return } }) @@ -48,7 +48,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot { if err != nil { W.error_msg = err.Error() W.error_ctx = e.ChildText(".price") - PrintlnOffer(W, "Whic: Converting discounted price failed") + W.Println("Whic: Converting discounted price failed") return } }) @@ -59,7 +59,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot { if err != nil { W.error_msg = err.Error() W.error_ctx = base_price_noisy - PrintlnOffer(W, "Whic: Sanitizing base price failed") + W.Println("Whic: Sanitizing base price failed") return } @@ -72,7 +72,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot { if err != nil { W.error_msg = err.Error() W.error_ctx = img_link_noisy - WarnOffer(W, "Whic: Parsing document in Goquery failed") + W.Println("Whic: Parsing document in Goquery failed") return } W.Image_url, _ = doc.Find("img").Attr("src") @@ -84,14 +84,14 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot { if W.Volume == 0 { W.error_msg = "Whic: Volume is zero" W.error_ctx = ctx - PrintlnOffer(W, "Whic: Volume is zero") + W.Println("Whic: Volume is zero") return } W.Abv, ctx = get_abv(e) if W.Abv == 0 { W.error_msg = "Whic: Abv is zero" W.error_ctx = ctx - PrintlnOffer(W, "Whic: Abv is zero") + W.Println("Whic: Abv is zero") return } |
