diff options
| author | horus | 2018-02-10 14:31:47 +0100 |
|---|---|---|
| committer | horus | 2018-02-10 14:31:47 +0100 |
| commit | 6e0858f00d941e96010b794c3f16e31cbef2e72d (patch) | |
| tree | 86575cc63adc2cc918bb9d2397f2340beb31bfde /crawler/utility.go | |
| parent | 20a25c6069f626e16da35e3a29f91dae764a09bb (diff) | |
| download | alkobote-6e0858f00d941e96010b794c3f16e31cbef2e72d.tar.gz | |
Crawler extracts volume, price per litre and abv. (Whisky World)
Diffstat (limited to 'crawler/utility.go')
| -rw-r--r-- | crawler/utility.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawler/utility.go b/crawler/utility.go index 19c4050..1e426b9 100644 --- a/crawler/utility.go +++ b/crawler/utility.go @@ -70,6 +70,9 @@ func extract_abv(abv_noisy string) (float32, error) { if strings.Contains(abv_noisy, "vol") { abv_noisy = strings.Replace(abv_noisy, "vol", "", 1) } + if strings.Contains(abv_noisy, "Vol") { + abv_noisy = strings.Replace(abv_noisy, "Vol", "", 1) + } abv_noisy = strings.Replace(abv_noisy, ",", ".", 1) abv_noisy = strings.TrimSpace(abv_noisy) |
