diff options
Diffstat (limited to 'crawler/shop_whic.go')
| -rw-r--r-- | crawler/shop_whic.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crawler/shop_whic.go b/crawler/shop_whic.go index 2d0170b..93bff23 100644 --- a/crawler/shop_whic.go +++ b/crawler/shop_whic.go @@ -12,7 +12,7 @@ func (app *App) ScrapeWhic(shop Shop) []Angebot { Shop_url := "https://whic.de/angebote" Whiskys := []Angebot{} - c := customCollector([]string{"whic.de"}) + c := app.customCollector([]string{"whic.de"}) c.OnHTML("li.item", func(e *colly.HTMLElement) { @@ -127,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 } |
