summaryrefslogtreecommitdiff
path: root/crawler/shop_whiskyde.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_whiskyde.go
parent64520ffa7b66f6914decf50c43c8698ce47ee1ce (diff)
downloadalkobote-a2d595423e4270d8e644212021ba70c70df075d9.tar.gz
Refactores logging functions. (crawler)
Diffstat (limited to 'crawler/shop_whiskyde.go')
-rw-r--r--crawler/shop_whiskyde.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/crawler/shop_whiskyde.go b/crawler/shop_whiskyde.go
index d3087ca..d06f522 100644
--- a/crawler/shop_whiskyde.go
+++ b/crawler/shop_whiskyde.go
@@ -37,7 +37,7 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText("del")
- PrintlnOffer(W, "Whisky.de: Converting original price failed")
+ W.Println("Whisky.de: Converting original price failed")
return
}
})
@@ -46,7 +46,7 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".article-price-default")
- PrintlnOffer(W, "Whisky.de: Converting discounted price failed")
+ W.Println("Whisky.de: Converting discounted price failed")
return
}
})
@@ -64,7 +64,7 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if !strings.Contains(text_noisy, "Liter") {
W.error_ctx = text_noisy
W.error_msg = "Whisky.de: String 'Liter' not found."
- PrintlnOffer(W, "Whisky.de: String 'Liter' not found.")
+ W.Println("Whisky.de: String 'Liter' not found.")
return
}
@@ -73,27 +73,27 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = text_noisy
- PrintlnOffer(W, "Whisky.de: Extracting volume failed")
+ W.Println("Whisky.de: Extracting volume failed")
return
}
W.Abv, err = extract_abv(abv_noisy)
if err != nil {
W.error_msg = err.Error()
W.error_ctx = abv_noisy
- PrintlnOffer(W, "Whisky.de: Extracting abv failed")
+ W.Println("Whisky.de: Extracting abv failed")
return
}
if W.Volume == 0 {
W.error_msg = "Whisky.de: Volume is zero"
W.error_ctx = text_noisy
- PrintlnOffer(W, "Whisky.de: Volume is zero")
+ W.Println("Whisky.de: Volume is zero")
return
}
if W.Abv == 0 {
W.error_msg = "Whisky.de: Abv is zero"
W.error_ctx = abv_noisy
- PrintlnOffer(W, "Whisky.de: Abv is zero")
+ W.Println("Whisky.de: Abv is zero")
return
}
@@ -101,7 +101,7 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".article-unitprice-default")
- PrintlnOffer(W, "Whisky.de: Converting base price failed")
+ W.Println("Whisky.de: Converting base price failed")
return
}