summaryrefslogtreecommitdiff
path: root/crawler/shop_mcwhisky.go
diff options
context:
space:
mode:
authorMaximilian Möhring2019-05-14 17:35:18 +0200
committerMaximilian Möhring2019-05-14 17:35:18 +0200
commita2d595423e4270d8e644212021ba70c70df075d9 (patch)
treea4d7f32400266a47b37d612babf9aa807c93f31d /crawler/shop_mcwhisky.go
parent64520ffa7b66f6914decf50c43c8698ce47ee1ce (diff)
downloadalkobote-a2d595423e4270d8e644212021ba70c70df075d9.tar.gz
Refactores logging functions. (crawler)
Diffstat (limited to 'crawler/shop_mcwhisky.go')
-rw-r--r--crawler/shop_mcwhisky.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/crawler/shop_mcwhisky.go b/crawler/shop_mcwhisky.go
index 941f3b9..027aeee 100644
--- a/crawler/shop_mcwhisky.go
+++ b/crawler/shop_mcwhisky.go
@@ -37,7 +37,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- PrintlnOffer(W, "MC Whisky: Converting original price failed")
+ W.Println("MC Whisky: Converting original price failed")
return
}
})
@@ -46,7 +46,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- PrintlnOffer(W, "MC Whisky: Converting discounted price failed")
+ W.Println("MC Whisky: Converting discounted price failed")
return
}
})
@@ -57,7 +57,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = price_per_litre_noisy
- PrintlnOffer(W, "MC Whisky: Sanitizing base price failed")
+ W.Println("MC Whisky: Sanitizing base price failed")
return
}
@@ -69,14 +69,14 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if volume_failed != "" {
W.error_msg = "MC Whisky: Volume failed"
W.error_ctx = volume_failed
- PrintlnOffer(W, "MC Whisky: Volume failed")
+ W.Println("MC Whisky: Volume failed")
return
}
abv_failed := e.Request.Ctx.Get("abv_failed")
if volume_failed != "" {
W.error_msg = "MC Whisky: Abv failed"
W.error_ctx = abv_failed
- PrintlnOffer(W, "MC Whisky: Abv failed")
+ W.Println("MC Whisky: Abv failed")
return
}
@@ -85,14 +85,14 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "MC Whisky: Volume is zero"
W.error_ctx = ctx
- PrintlnOffer(W, "MC Whisky: Volume is zero")
+ W.Println("MC Whisky: Volume is zero")
return
}
W.Abv, ctx = get_abv(e)
if W.Abv == 0 {
W.error_msg = "MC Whisky: Abv is zero"
W.error_ctx = ctx
- PrintlnOffer(W, "MC Whisky: Abv is zero")
+ W.Println("MC Whisky: Abv is zero")
return
}