summaryrefslogtreecommitdiff
path: root/crawler/shop_mcwhisky.go
diff options
context:
space:
mode:
authorhorus2018-06-18 15:54:53 +0200
committerhorus2018-06-18 15:54:53 +0200
commit01e0cbe79f37b4be2fc82d31c71042b5ce4d699a (patch)
treebb179b5c5c6349a69853c3781236b6056b7e7ea6 /crawler/shop_mcwhisky.go
parent88a2628258eb5ea79736338637ab8b5b83680c92 (diff)
parent8114b7b17b723a5fe0fee24470e255faf587332e (diff)
downloadalkobote-01e0cbe79f37b4be2fc82d31c71042b5ce4d699a.tar.gz
Merge branch 'master' of /home/horus/app/fk_angebote
Diffstat (limited to 'crawler/shop_mcwhisky.go')
-rw-r--r--crawler/shop_mcwhisky.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawler/shop_mcwhisky.go b/crawler/shop_mcwhisky.go
index cea020a..941f3b9 100644
--- a/crawler/shop_mcwhisky.go
+++ b/crawler/shop_mcwhisky.go
@@ -11,10 +11,7 @@ func (app *App) ScrapeMCWhisky(shop Shop) []Angebot {
Whiskys := []Angebot{}
- c := colly.NewCollector(
- colly.AllowedDomains("mcwhisky.com"),
- colly.AllowedDomains("www.mcwhisky.com"),
- )
+ c := app.customCollector([]string{"mcwhisky.com", "www.mcwhisky.com"})
c.OnHTML("li.item", func(e *colly.HTMLElement) {
@@ -133,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
}