summaryrefslogtreecommitdiff
path: root/crawler/shop_whiskyzone.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_whiskyzone.go
parent64520ffa7b66f6914decf50c43c8698ce47ee1ce (diff)
downloadalkobote-a2d595423e4270d8e644212021ba70c70df075d9.tar.gz
Refactores logging functions. (crawler)
Diffstat (limited to 'crawler/shop_whiskyzone.go')
-rw-r--r--crawler/shop_whiskyzone.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawler/shop_whiskyzone.go b/crawler/shop_whiskyzone.go
index dbaf0ba..ffb124d 100644
--- a/crawler/shop_whiskyzone.go
+++ b/crawler/shop_whiskyzone.go
@@ -37,7 +37,7 @@ func (app *App) ScrapeWhiskyzone(shop Shop) []Angebot {
e.Request.Visit(W.Url)
if "sold_out" == e.Request.Ctx.Get("sold_out") {
- PrintlnOffer(W, "Whiskyzone: Sold out")
+ W.Println("Whiskyzone: Sold out")
return
}
@@ -46,7 +46,7 @@ func (app *App) ScrapeWhiskyzone(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.Request.Ctx.Get("discounted_price")
- PrintlnOffer(W, "Whiskyzone: Convert discounted price failed")
+ W.Println("Whiskyzone: Convert discounted price failed")
return
}
@@ -54,7 +54,7 @@ func (app *App) ScrapeWhiskyzone(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.Request.Ctx.Get("original_price")
- PrintlnOffer(W, "Whiskyzone: Convert original price failed")
+ W.Println("Whiskyzone: Convert original price failed")
return
}
@@ -63,14 +63,14 @@ func (app *App) ScrapeWhiskyzone(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "Whiskyzone: Volume is zero"
W.error_ctx = ctx
- PrintlnOffer(W, "Whiskyzone: Volume is zero")
+ W.Println("Whiskyzone: Volume is zero")
return
}
W.Abv, ctx = get_abv(e)
if W.Abv == 0 {
W.error_msg = "Whiskyzone: Abv is zero"
W.error_ctx = ctx
- PrintlnOffer(W, "Whiskyzone: Abv is zero")
+ W.Println("Whiskyzone: Abv is zero")
return
}
@@ -82,7 +82,7 @@ func (app *App) ScrapeWhiskyzone(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = base_price
- PrintlnOffer(W, "Whiskyzone: Extracting base price failed")
+ W.Println("Whiskyzone: Extracting base price failed")
return
}
}