diff --git a/lib/scrapers.js b/lib/scrapers.js index 393b808..c9010b0 100644 --- a/lib/scrapers.js +++ b/lib/scrapers.js @@ -30,7 +30,10 @@ async function extractOddsData(page, callback, leagueName) { await page.goto(`https://www.oddsportal.com${link}`); const [day, date, time] = await page.$$eval('div.bg-event-start-time ~ p', els => els.map(el => el.innerText)); - const [homeTeam, awayTeam] = await page.$$eval('span.truncate', els => els.map(el => el.textContent)); + const [homeTeam, awayTeam] = await page.$$eval( + `[data-testid="game-participants"] p.truncate`, + (els) => els.map((el) => el.textContent) + ); const mlFullTime = await extractMlOdds(page, "fullTime"); const mlFirstHalf = await extractMlOdds(page, "firstHalf"); const mlSecondHalf = await extractMlOdds(page, "secondHalf"); @@ -274,4 +277,4 @@ async function nextMatchesScraper(browser, leagueName, oddsFormat, callback) { } -export { historicScraper, nextMatchesScraper }; \ No newline at end of file +export { historicScraper, nextMatchesScraper };