diff options
| author | horus | 2018-02-17 19:07:08 +0100 |
|---|---|---|
| committer | horus | 2018-02-17 19:07:08 +0100 |
| commit | 47ee2f721f552d0b65159516f7420d14a7880bbd (patch) | |
| tree | e6f47ac4974833774f5dac4f584753f5c9a7ed56 /crawler/shop_whiskysitenl.go | |
| parent | a5febb8c285ca68e34f55c34d32d24aacd41a52d (diff) | |
| download | alkobote-47ee2f721f552d0b65159516f7420d14a7880bbd.tar.gz | |
Minor improvement in logging. (crawler)
Diffstat (limited to 'crawler/shop_whiskysitenl.go')
| -rw-r--r-- | crawler/shop_whiskysitenl.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawler/shop_whiskysitenl.go b/crawler/shop_whiskysitenl.go index d69ec68..e410445 100644 --- a/crawler/shop_whiskysitenl.go +++ b/crawler/shop_whiskysitenl.go @@ -8,6 +8,7 @@ import ( ) func (app *App) ScrapeWhiskysitenl(shop Shop) []Angebot { + Whiskys := []Angebot{} Shop_url := "https://www.whiskysite.nl/en/specials/?limit=100" @@ -94,6 +95,8 @@ func (app *App) ScrapeWhiskysitenl(shop Shop) []Angebot { // calculate base price, volume is never zero W.Base_price = int(RoundToEven(float64(W.Discounted_price) / float64(W.Volume))) + W.Website = e.Request.Ctx.Get("website") + Whiskys = append(Whiskys, W) }) @@ -135,6 +138,7 @@ func (app *App) ScrapeWhiskysitenl(shop Shop) []Angebot { } e.Request.Ctx.Put("abv", abv_noisy) + e.Request.Ctx.Put("website", string(e.Response.Body)) }) c.Visit(Shop_url) |
