summaryrefslogtreecommitdiff
path: root/crawler/shop_mcwhisky.go
diff options
context:
space:
mode:
authorhorus2018-06-15 23:28:18 +0200
committerhorus2018-06-15 23:28:18 +0200
commit8d68ac7c900241eb8499a94c23ab1f60750e7aed (patch)
tree3a5d444f866383d5cdefc512242dc2afa236641e /crawler/shop_mcwhisky.go
parent0026ba55f03c5378d5773459fcdd7c6931ff42a5 (diff)
downloadalkobote-8d68ac7c900241eb8499a94c23ab1f60750e7aed.tar.gz
Introduces config for user agent, robots.txt and crawler delay. (crawler)
Diffstat (limited to 'crawler/shop_mcwhisky.go')
-rw-r--r--crawler/shop_mcwhisky.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawler/shop_mcwhisky.go b/crawler/shop_mcwhisky.go
index ef780a9..941f3b9 100644
--- a/crawler/shop_mcwhisky.go
+++ b/crawler/shop_mcwhisky.go
@@ -11,7 +11,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
Whiskys := []Angebot{}
- c := customCollector([]string{"mcwhisky.com", "www.mcwhisky.com"})
+ c := app.customCollector([]string{"mcwhisky.com", "www.mcwhisky.com"})
c.OnHTML("li.item", func(e *colly.HTMLElement) {
@@ -130,7 +130,10 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
})
- c.Visit(Shop_url)
+ err := c.Visit(Shop_url)
+ if err != nil {
+ Warn(nil, shop.Name+": "+err.Error())
+ }
return Whiskys
}