summaryrefslogtreecommitdiff
path: root/crawler/shop_mcwhisky.go
diff options
context:
space:
mode:
authorhorus_arch2018-02-07 19:09:22 +0100
committerhorus_arch2018-02-07 19:09:22 +0100
commit14a89c34096d2ddb2a7750feda143207110e838b (patch)
treea3edce53bf431977b196fbe4e7fcd1027c11dc41 /crawler/shop_mcwhisky.go
parent213317c558142f18b213d3d7b46231817138ca20 (diff)
downloadalkobote-14a89c34096d2ddb2a7750feda143207110e838b.tar.gz
Adds sanitizer.
Diffstat (limited to 'crawler/shop_mcwhisky.go')
-rw-r--r--crawler/shop_mcwhisky.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawler/shop_mcwhisky.go b/crawler/shop_mcwhisky.go
index e45e740..e0c1ab8 100644
--- a/crawler/shop_mcwhisky.go
+++ b/crawler/shop_mcwhisky.go
@@ -19,7 +19,7 @@ func ScrapeMCWhisky(shop Shop) []Angebot {
c.OnHTML("li.item", func(e *colly.HTMLElement) {
W := Angebot{}
- whisky_name := sanitize_name(e.ChildAttr("a", "title"))
+ whisky_name := e.ChildAttr("a", "title")
whisky_url := e.ChildAttr("a", "href")
W.Name = whisky_name
W.Url = whisky_url
@@ -28,13 +28,13 @@ func ScrapeMCWhisky(shop Shop) []Angebot {
e.ForEach(".price-box", func(i int, e *colly.HTMLElement) {
e.ForEach(".old-price", func(i int, e *colly.HTMLElement) {
- W.Original_price, err = sanitize_price(e.ChildText(".price"))
+ W.Original_price, err = convert_price(e.ChildText(".price"))
if err != nil {
log.Fatal(err)
}
})
e.ForEach(".special-price", func(i int, e *colly.HTMLElement) {
- W.Discounted_price, err = sanitize_price(e.ChildText(".price"))
+ W.Discounted_price, err = convert_price(e.ChildText(".price"))
if err != nil {
log.Fatal(err)
}