diff options
Diffstat (limited to 'crawler/shop_whiskyde.go')
| -rw-r--r-- | crawler/shop_whiskyde.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawler/shop_whiskyde.go b/crawler/shop_whiskyde.go index b450c86..77e4bcb 100644 --- a/crawler/shop_whiskyde.go +++ b/crawler/shop_whiskyde.go @@ -81,9 +81,19 @@ func ScrapeWhiskyde(shop Shop) []Angebot { log.Fatal(err) } + e.Request.Visit(W.Url) + W.Website = e.Request.Ctx.Get("website") + Whiskys = append(Whiskys, W) }) + c.OnHTML("body", func(e *colly.HTMLElement) { + if e.Request.URL.String() == Shop_url { + return + } + e.Request.Ctx.Put("website", string(e.Response.Body)) + }) + c.Visit(Shop_url) return Whiskys |
