diff options
| author | horus | 2018-05-14 16:40:03 +0200 |
|---|---|---|
| committer | horus | 2018-05-14 16:40:03 +0200 |
| commit | d2e65d7a6d51c030ebc87b660bf482ae2ad024f3 (patch) | |
| tree | fce56a19f25d0118600f38c1c1d94575c3c1f663 /crawler/shop_whiskyworld.go | |
| parent | 006efbf61b28febfb79e93f6476e0552bbcc08bc (diff) | |
| download | alkobote-d2e65d7a6d51c030ebc87b660bf482ae2ad024f3.tar.gz | |
Various fix, e.g. it repairs wrong image urls. (crawler)
Diffstat (limited to 'crawler/shop_whiskyworld.go')
| -rw-r--r-- | crawler/shop_whiskyworld.go | 5 |
1 files changed, 3 insertions, 2 deletions
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) }) |
