summaryrefslogtreecommitdiff
path: root/crawler/shop_whiskyworld.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_whiskyworld.go
parent64520ffa7b66f6914decf50c43c8698ce47ee1ce (diff)
downloadalkobote-a2d595423e4270d8e644212021ba70c70df075d9.tar.gz
Refactores logging functions. (crawler)
Diffstat (limited to 'crawler/shop_whiskyworld.go')
-rw-r--r--crawler/shop_whiskyworld.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/crawler/shop_whiskyworld.go b/crawler/shop_whiskyworld.go
index 3f0874d..78e7244 100644
--- a/crawler/shop_whiskyworld.go
+++ b/crawler/shop_whiskyworld.go
@@ -43,7 +43,7 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = regular_price
- PrintlnOffer(W, "Whiskyworld: Converting original price failed")
+ W.Println("Whiskyworld: Converting original price failed")
return
}
@@ -51,7 +51,7 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".uvp")
- PrintlnOffer(W, "Whiskyworld: Converting discounted price failed")
+ W.Println("Whiskyworld: Converting discounted price failed")
return
}
@@ -61,13 +61,13 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = text_noisy
- PrintlnOffer(W, "Whiskyworld: Extracting volume failed")
+ W.Println("Whiskyworld: Extracting volume failed")
return
}
if W.Volume == 0 {
W.error_msg = "Whiskyworld: Volume is zero"
W.error_ctx = text_noisy
- PrintlnOffer(W, "Whiskyworld: Volume is zero")
+ W.Println("Whiskyworld: Volume is zero")
return
}
abv_noisy := strings.TrimSpace(strings.SplitAfter(text_noisy, "Liter")[1])
@@ -76,13 +76,13 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = abv_noisy
- PrintlnOffer(W, "Whiskyworld: Extracting abv failed")
+ W.Println("Whiskyworld: Extracting abv failed")
return
}
if W.Abv == 0 {
W.error_msg = "Whiskyworld: Abv is zero"
W.error_ctx = abv_noisy
- PrintlnOffer(W, "Whiskyworld: Abv is zero")
+ W.Println("Whiskyworld: Abv is zero")
return
}
})
@@ -95,7 +95,7 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = base_price_noisy
- PrintlnOffer(W, "Whiskyworld: Sanitizing base price failed")
+ W.Println("Whiskyworld: Sanitizing base price failed")
return
}
}