diff --git a/src/scrapers/euromilhoes.ts b/src/scrapers/euromilhoes.ts index c1990d1..5027d57 100644 --- a/src/scrapers/euromilhoes.ts +++ b/src/scrapers/euromilhoes.ts @@ -42,6 +42,22 @@ function getKey(element: cheerio.Cheerio) { const numbers = splitKey[0].split(" "); const stars = splitKey[1].split(" "); + // Not sure why, but an empty string is being inserted into the array + numbers.forEach((value, i) => { + console.log(value == ""); + if (value == "") { + numbers.splice(i, i); + } + }); + + stars.forEach((value, i) => { + if (value == "") { + numbers.splice(i, i); + } + }); + + console.log(stars); + return { numbers: numbers, stars: stars }; }