From c59d15dfc04e0fb75c8132a3ce778dcf801645c1 Mon Sep 17 00:00:00 2001 From: horus Date: Fri, 15 Jun 2018 16:19:58 +0200 Subject: Fix because changed html. (crawler) --- crawler/shop_whiskyworld.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crawler/shop_whiskyworld.go') diff --git a/crawler/shop_whiskyworld.go b/crawler/shop_whiskyworld.go index af97511..f617ebb 100644 --- a/crawler/shop_whiskyworld.go +++ b/crawler/shop_whiskyworld.go @@ -106,7 +106,10 @@ func (app *App) ScrapeWhiskyworld(shop Shop) []Angebot { }) - W.Image_url = "https:" + e.ChildAttr("img", "data-src") + W.Image_url = e.ChildAttr("img", "data-src") + if !strings.HasPrefix(W.Image_url, "https:") { + W.Image_url = "https:" + W.Image_url + } e.Request.Visit(W.Url) W.Website = e.Request.Ctx.Get("website") -- cgit v1.2.3