summaryrefslogtreecommitdiff
path: root/crawler/shop_whic.go
diff options
context:
space:
mode:
Diffstat (limited to 'crawler/shop_whic.go')
-rw-r--r--crawler/shop_whic.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawler/shop_whic.go b/crawler/shop_whic.go
index af86bdc..93bff23 100644
--- a/crawler/shop_whic.go
+++ b/crawler/shop_whic.go
@@ -12,9 +12,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot {
Shop_url := "https://whic.de/angebote"
Whiskys := []Angebot{}
- c := colly.NewCollector(
- colly.AllowedDomains("whic.de"),
- )
+ c := app.customCollector([]string{"whic.de"})
c.OnHTML("li.item", func(e *colly.HTMLElement) {
@@ -129,7 +127,10 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot {
e.Request.Ctx.Put("website", string(e.Response.Body))
})
- c.Visit(Shop_url)
+ err := c.Visit(Shop_url)
+ if err != nil {
+ Warn(nil, shop.Name+": "+err.Error())
+ }
return Whiskys
}