summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorus_arch2018-02-19 10:34:46 +0100
committerhorus_arch2018-02-19 10:34:46 +0100
commit8700aaaec582744a04af65eeff7e9ff8555b194a (patch)
tree572f6b19f0f6170b34e075aa2c5e2fd6fd07c175
parentd17b21f91a7b0d94adb0002cc9c41137eee11389 (diff)
downloadalkobote-8700aaaec582744a04af65eeff7e9ff8555b194a.tar.gz
Changes log level while crawling from warning to info. (crawler)
-rw-r--r--crawler/shop_bottleworld.go10
-rw-r--r--crawler/shop_mcwhisky.go14
-rw-r--r--crawler/shop_rumundco.go18
-rw-r--r--crawler/shop_whic.go10
-rw-r--r--crawler/shop_whiskyde.go16
-rw-r--r--crawler/shop_whiskysitenl.go12
-rw-r--r--crawler/shop_whiskyworld.go14
-rw-r--r--crawler/shop_whiskyzone.go10
8 files changed, 52 insertions, 52 deletions
diff --git a/crawler/shop_bottleworld.go b/crawler/shop_bottleworld.go
index 0057bff..b92896d 100644
--- a/crawler/shop_bottleworld.go
+++ b/crawler/shop_bottleworld.go
@@ -36,7 +36,7 @@ func (app *App) ScrapeBottleWord(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- WarnOffer(W, "Bottleworld: Converting original price failed")
+ PrintlnOffer(W, "Bottleworld: Converting original price failed")
return
}
})
@@ -45,7 +45,7 @@ func (app *App) ScrapeBottleWord(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- WarnOffer(W, "Bottleworld: Converting discounted price failed")
+ PrintlnOffer(W, "Bottleworld: Converting discounted price failed")
return
}
})
@@ -56,7 +56,7 @@ func (app *App) ScrapeBottleWord(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = price_per_litre_noisy
- WarnOffer(W, "Bottleworld: Sanitizing base price failed")
+ PrintlnOffer(W, "Bottleworld: Sanitizing base price failed")
return
}
W.Base_price = price_per_litre
@@ -70,14 +70,14 @@ func (app *App) ScrapeBottleWord(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "Bottleworld: Volume is zero"
W.error_ctx = ctx
- WarnOffer(W, "Bottleworld: Volume is zero")
+ PrintlnOffer(W, "Bottleworld: Volume is zero")
return
}
W.Abv, ctx = get_abv(e)
if W.Abv == 0 {
W.error_msg = "Bottleworld: Abv is zero"
W.error_ctx = ctx
- WarnOffer(W, "Bottleworld: Abv is zero")
+ PrintlnOffer(W, "Bottleworld: Abv is zero")
return
}
diff --git a/crawler/shop_mcwhisky.go b/crawler/shop_mcwhisky.go
index 87d822e..cea020a 100644
--- a/crawler/shop_mcwhisky.go
+++ b/crawler/shop_mcwhisky.go
@@ -40,7 +40,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- WarnOffer(W, "MC Whisky: Converting original price failed")
+ PrintlnOffer(W, "MC Whisky: Converting original price failed")
return
}
})
@@ -49,7 +49,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- WarnOffer(W, "MC Whisky: Converting discounted price failed")
+ PrintlnOffer(W, "MC Whisky: Converting discounted price failed")
return
}
})
@@ -60,7 +60,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = price_per_litre_noisy
- WarnOffer(W, "MC Whisky: Sanitizing base price failed")
+ PrintlnOffer(W, "MC Whisky: Sanitizing base price failed")
return
}
@@ -72,14 +72,14 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if volume_failed != "" {
W.error_msg = "MC Whisky: Volume failed"
W.error_ctx = volume_failed
- WarnOffer(W, "MC Whisky: Volume failed")
+ PrintlnOffer(W, "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
- WarnOffer(W, "MC Whisky: Abv failed")
+ PrintlnOffer(W, "MC Whisky: Abv failed")
return
}
@@ -88,14 +88,14 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "MC Whisky: Volume is zero"
W.error_ctx = ctx
- WarnOffer(W, "MC Whisky: Volume is zero")
+ PrintlnOffer(W, "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
- WarnOffer(W, "MC Whisky: Abv is zero")
+ PrintlnOffer(W, "MC Whisky: Abv is zero")
return
}
diff --git a/crawler/shop_rumundco.go b/crawler/shop_rumundco.go
index 30c8765..1ce202f 100644
--- a/crawler/shop_rumundco.go
+++ b/crawler/shop_rumundco.go
@@ -40,7 +40,7 @@ func (app *App) ScrapeRumundCo(shop Shop) []Angebot {
if !matched {
W.error_msg = "Rum & Co: Offer not available"
W.error_ctx = e.ChildText(".delivery-status")
- WarnOffer(W, "Rum & Co: Offer not available")
+ PrintlnOffer(W, "Rum & Co: Offer not available")
return
}
@@ -58,21 +58,21 @@ func (app *App) ScrapeRumundCo(shop Shop) []Angebot {
if "" == regular_price {
W.error_msg = "Rum & Co: No regular price found"
W.error_ctx = regular_price
- WarnOffer(W, "Rum & Co: No regular price found")
+ PrintlnOffer(W, "Rum & Co: No regular price found")
return
}
W.Original_price, err = convert_price(regular_price)
if err != nil {
W.error_msg = err.Error()
W.error_ctx = regular_price
- WarnOffer(W, "Rum & Co: Original price: Convert price failed")
+ PrintlnOffer(W, "Rum & Co: Original price: Convert price failed")
return
}
W.Discounted_price, err = convert_price(e.ChildText(".price-value"))
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price-value")
- WarnOffer(W, "Rum & Co: Discounted price: Convert price failed")
+ PrintlnOffer(W, "Rum & Co: Discounted price: Convert price failed")
return
}
@@ -82,7 +82,7 @@ func (app *App) ScrapeRumundCo(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".value")
- WarnOffer(W, "Rum & Co: Base price: Sanitizing base price failed")
+ PrintlnOffer(W, "Rum & Co: Base price: Sanitizing base price failed")
return
}
})
@@ -101,7 +101,7 @@ func (app *App) ScrapeRumundCo(shop Shop) []Angebot {
if len(image_url_noisy_slice) < 2 {
W.error_msg = "Rum & Co: (Pagespeed) Image URL not found"
W.error_ctx = image_url_noisy
- WarnOffer(W, "Rum & Co: (Pagespeed) Image URL not found")
+ PrintlnOffer(W, "Rum & Co: (Pagespeed) Image URL not found")
return
}
image_url_noisy = strings.Replace(image_url_noisy, image_url_noisy_slice[1], "", 1)
@@ -117,7 +117,7 @@ func (app *App) ScrapeRumundCo(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "Rum & Co: Volume is zero"
W.error_ctx = ctx
- WarnOffer(W, "Rum & Co: Volume is zero")
+ PrintlnOffer(W, "Rum & Co: Volume is zero")
return
}
@@ -129,14 +129,14 @@ func (app *App) ScrapeRumundCo(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = abv_noisy
- WarnOffer(W, "Rum & Co: Base price: Extracting ABV failed")
+ PrintlnOffer(W, "Rum & Co: Base price: Extracting ABV failed")
return
}
}
if W.Abv == 0 {
W.error_msg = "Rum & Co: Abv is zero"
W.error_ctx = abv_noisy
- WarnOffer(W, "Rum & Co: Abv is zero")
+ PrintlnOffer(W, "Rum & Co: Abv is zero")
return
}
W.Website = e.Request.Ctx.Get("website")
diff --git a/crawler/shop_whic.go b/crawler/shop_whic.go
index b5ff1af..a199b2c 100644
--- a/crawler/shop_whic.go
+++ b/crawler/shop_whic.go
@@ -41,7 +41,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- WarnOffer(W, "Whic: Converting original price failed")
+ PrintlnOffer(W, "Whic: Converting original price failed")
return
}
})
@@ -50,7 +50,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".price")
- WarnOffer(W, "Whic: Converting discounted price failed")
+ PrintlnOffer(W, "Whic: Converting discounted price failed")
return
}
})
@@ -61,7 +61,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = base_price_noisy
- WarnOffer(W, "Whic: Sanitizing base price failed")
+ PrintlnOffer(W, "Whic: Sanitizing base price failed")
return
}
@@ -85,14 +85,14 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "Whic: Volume is zero"
W.error_ctx = ctx
- WarnOffer(W, "Whic: Volume is zero")
+ PrintlnOffer(W, "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
- WarnOffer(W, "Whic: Abv is zero")
+ PrintlnOffer(W, "Whic: Abv is zero")
return
}
diff --git a/crawler/shop_whiskyde.go b/crawler/shop_whiskyde.go
index 7ad7fd7..2df28fa 100644
--- a/crawler/shop_whiskyde.go
+++ b/crawler/shop_whiskyde.go
@@ -39,7 +39,7 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText("del")
- WarnOffer(W, "Whisky.de: Converting original price failed")
+ PrintlnOffer(W, "Whisky.de: Converting original price failed")
return
}
})
@@ -48,7 +48,7 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".article-price-default")
- WarnOffer(W, "Whisky.de: Converting discounted price failed")
+ PrintlnOffer(W, "Whisky.de: Converting discounted price failed")
return
}
})
@@ -66,7 +66,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."
- WarnOffer(W, "Whisky.de: String 'Liter' not found.")
+ PrintlnOffer(W, "Whisky.de: String 'Liter' not found.")
return
}
@@ -75,27 +75,27 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = text_noisy
- WarnOffer(W, "Whisky.de: Extracting volume failed")
+ PrintlnOffer(W, "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
- WarnOffer(W, "Whisky.de: Extracting abv failed")
+ PrintlnOffer(W, "Whisky.de: Extracting abv failed")
return
}
if W.Volume == 0 {
W.error_msg = "Whisky.de: Volume is zero"
W.error_ctx = text_noisy
- WarnOffer(W, "Whisky.de: Volume is zero")
+ PrintlnOffer(W, "Whisky.de: Volume is zero")
return
}
if W.Abv == 0 {
W.error_msg = "Whisky.de: Abv is zero"
W.error_ctx = abv_noisy
- WarnOffer(W, "Whisky.de: Abv is zero")
+ PrintlnOffer(W, "Whisky.de: Abv is zero")
return
}
@@ -103,7 +103,7 @@ func (app *App) ScrapeWhiskyde(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".article-unitprice-default")
- WarnOffer(W, "Whisky.de: Converting base price failed")
+ PrintlnOffer(W, "Whisky.de: Converting base price failed")
return
}
diff --git a/crawler/shop_whiskysitenl.go b/crawler/shop_whiskysitenl.go
index e410445..f1b667c 100644
--- a/crawler/shop_whiskysitenl.go
+++ b/crawler/shop_whiskysitenl.go
@@ -47,14 +47,14 @@ func (app *App) ScrapeWhiskysitenl(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = regular_price
- WarnOffer(W, "Whiskysite.nl: Extracting original price failed")
+ PrintlnOffer(W, "Whiskysite.nl: Extracting original price failed")
return
}
W.Discounted_price, err = convert_price(discounted_price)
if err != nil {
W.error_msg = err.Error()
W.error_ctx = discounted_price
- WarnOffer(W, "Whiskysite.nl: Extracting discounted price failed")
+ PrintlnOffer(W, "Whiskysite.nl: Extracting discounted price failed")
return
}
@@ -66,13 +66,13 @@ func (app *App) ScrapeWhiskysitenl(shop Shop) []Angebot {
if volume_failed != "" {
W.error_msg = "Whiskysite.nl: Extracting volume via Liter-Regex failed"
W.error_ctx = volume_failed
- WarnOffer(W, "Whiskysite.nl: Extracting volume via Liter-Regex failed")
+ PrintlnOffer(W, "Whiskysite.nl: Extracting volume via Liter-Regex failed")
return
}
if e.Request.Ctx.Get("abv_failed") != "" {
W.error_msg = "Whiskysite.nl: Extracting abv via Abv-Regex failed"
W.error_ctx = e.Request.Ctx.Get("volume_failed")
- WarnOffer(W, "Whiskysite.nl: Extracting abv via Abv-Regex failed")
+ PrintlnOffer(W, "Whiskysite.nl: Extracting abv via Abv-Regex failed")
return
}
@@ -81,14 +81,14 @@ func (app *App) ScrapeWhiskysitenl(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "Whiskysite.nl: Extracting volume failed"
W.error_ctx = ctx
- WarnOffer(W, "Whiskysite.nl: Extracting volume failed")
+ PrintlnOffer(W, "Whiskysite.nl: Extracting volume failed")
return
}
W.Abv, ctx = get_abv(e)
if W.Abv == 0 {
W.error_msg = "Whiskysite.nl: Extracting abv failed"
W.error_ctx = ctx
- WarnOffer(W, "Whiskysite.nl: Extracting abv failed")
+ PrintlnOffer(W, "Whiskysite.nl: Extracting abv failed")
return
}
diff --git a/crawler/shop_whiskyworld.go b/crawler/shop_whiskyworld.go
index 6306f6f..0f39db7 100644
--- a/crawler/shop_whiskyworld.go
+++ b/crawler/shop_whiskyworld.go
@@ -47,7 +47,7 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = regular_price
- WarnOffer(W, "Whiskyworld: Converting original price failed")
+ PrintlnOffer(W, "Whiskyworld: Converting original price failed")
return
}
@@ -55,7 +55,7 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = e.ChildText(".uvp")
- WarnOffer(W, "Whiskyworld: Converting discounted price failed")
+ PrintlnOffer(W, "Whiskyworld: Converting discounted price failed")
return
}
@@ -65,13 +65,13 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = text_noisy
- WarnOffer(W, "Whiskyworld: Extracting volume failed")
+ PrintlnOffer(W, "Whiskyworld: Extracting volume failed")
return
}
if W.Volume == 0 {
W.error_msg = "Whiskyworld: Volume is zero"
W.error_ctx = text_noisy
- WarnOffer(W, "Whiskyworld: Volume is zero")
+ PrintlnOffer(W, "Whiskyworld: Volume is zero")
return
}
abv_noisy := strings.TrimSpace(strings.SplitAfter(text_noisy, "Liter")[1])
@@ -80,13 +80,13 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = abv_noisy
- WarnOffer(W, "Whiskyworld: Extracting abv failed")
+ PrintlnOffer(W, "Whiskyworld: Extracting abv failed")
return
}
if W.Abv == 0 {
W.error_msg = "Whiskyworld: Abv is zero"
W.error_ctx = abv_noisy
- WarnOffer(W, "Whiskyworld: Abv is zero")
+ PrintlnOffer(W, "Whiskyworld: Abv is zero")
return
}
})
@@ -99,7 +99,7 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = base_price_noisy
- WarnOffer(W, "Whiskyworld: Sanitizing base price failed")
+ PrintlnOffer(W, "Whiskyworld: Sanitizing base price failed")
return
}
}
diff --git a/crawler/shop_whiskyzone.go b/crawler/shop_whiskyzone.go
index f01e93f..eae0852 100644
--- a/crawler/shop_whiskyzone.go
+++ b/crawler/shop_whiskyzone.go
@@ -47,7 +47,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")
- WarnOffer(W, "Whiskyzone: Convert discounted price failed")
+ PrintlnOffer(W, "Whiskyzone: Convert discounted price failed")
return
}
@@ -55,7 +55,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")
- WarnOffer(W, "Whiskyzone: Convert original price failed")
+ PrintlnOffer(W, "Whiskyzone: Convert original price failed")
return
}
@@ -64,14 +64,14 @@ func (app *App) ScrapeWhiskyzone(shop Shop) []Angebot {
if W.Volume == 0 {
W.error_msg = "Whiskyzone: Volume is zero"
W.error_ctx = ctx
- WarnOffer(W, "Whiskyzone: Volume is zero")
+ PrintlnOffer(W, "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
- WarnOffer(W, "Whiskyzone: Abv is zero")
+ PrintlnOffer(W, "Whiskyzone: Abv is zero")
return
}
@@ -83,7 +83,7 @@ func (app *App) ScrapeWhiskyzone(shop Shop) []Angebot {
if err != nil {
W.error_msg = err.Error()
W.error_ctx = base_price
- WarnOffer(W, "Whiskyzone: Extracting base price failed")
+ PrintlnOffer(W, "Whiskyzone: Extracting base price failed")
return
}
}