From d2e65d7a6d51c030ebc87b660bf482ae2ad024f3 Mon Sep 17 00:00:00 2001 From: horus Date: Mon, 14 May 2018 16:40:03 +0200 Subject: Various fix, e.g. it repairs wrong image urls. (crawler) --- crawler/shop_whiskyworld.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawler/shop_whiskyworld.go') diff --git a/crawler/shop_whiskyworld.go b/crawler/shop_whiskyworld.go index 0f39db7..af97511 100644 --- a/crawler/shop_whiskyworld.go +++ b/crawler/shop_whiskyworld.go @@ -31,7 +31,7 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot { W.Shop = shop.Id W.Spirit_type = "Whisky" - whisky_name_part1 := e.ChildText("h3") + whisky_name_part1 := e.ChildText(".item-brand") whisky_name_part2 := e.ChildText(".item-description") W.Name = whisky_name_part1 + " " + whisky_name_part2 @@ -106,10 +106,11 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot { }) - W.Image_url = "https:" + e.ChildAttr("img", "src") + W.Image_url = "https:" + e.ChildAttr("img", "data-src") e.Request.Visit(W.Url) W.Website = e.Request.Ctx.Get("website") + //Debug(nil, W.Website) Whiskys = append(Whiskys, W) }) -- cgit v1.2.3