There is a casino website
https://www.888casino.com/live-casino/?reason=0#filters=all-roulette
When I enter one of the tables, an IFRAME opens and inside the IFRAME there is a #document
The #document does not let me select the data inside the iframe and that is where the data I need is
let mesaRoulette = false;
const browser = await puppeteer.launch({
headless: false,
userDataDir: './userData',
args: ['--start-maximized'],
devtools: true,
});
const [ page ] = await browser.pages();
await page.setDefaultNavigationTimeout(0);
await page.goto('https://es.888casino.com/live-casino/?reason=0#filters=all-roulette');
await page.waitForTimeout(10000);
const mesas = await page.$$('#orbit-container > div > main > div > div > div > div > div.item-wrapper-box');
for (const mesa of mesas) {
const tituloSelector = await mesa.$('#orbit-container > div > main > div > div > div > div > div.item-wrapper-box > div > span');
if (tituloSelector){
const titulo = await mesa.$eval('#orbit-container > div > main > div > div > div > div > div.item-wrapper-box > div > span', el => el.innerText);
console.log(titulo);
if (titulo === 'Roulette'){
// const img = await mesa.$('#orbit-container > div > main > div > div > div > div > div.item-wrapper-box > div > img');
await mesa.click('#orbit-container > div > main > div > div > div > div > div.item-wrapper-box');
mesaRoulette = true;
break;
}
};
}