We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe3f451 commit f7b4734Copy full SHA for f7b4734
scraper/src/scraper/scraper_impl.go
@@ -15,13 +15,15 @@ type ScraperImpl struct {
15
Collector *colly.Collector
16
}
17
18
+// CleanPrice implements Scraper.
19
// CleanPrice implements Scraper.
20
func (s *ScraperImpl) CleanPrice(price string) ([]int, error) {
21
cleaned := strings.ReplaceAll(price, "$", "")
22
cleaned = strings.ReplaceAll(cleaned, ".", "")
23
+ cleaned = strings.TrimSpace(cleaned) // Limpieza adicional
24
- if strings.Contains(cleaned, "-") {
- priceParts := strings.Split(cleaned, "-")
25
+ if strings.Contains(cleaned, "\u2013") {
26
+ priceParts := strings.Split(cleaned, "\u2013")
27
var prices []int
28
for _, part := range priceParts {
29
part = strings.TrimSpace(part)
0 commit comments