I am trying to scrape data from a website with framesets and frames to an Android application in Android Studio.
<!DOCTYPE HTML>
<html>
<head>
</head>
<!-- frames -->
<frameset rows="32,*" frameborder="0" framespacing="0">
<frame name="frMenu" src="Sestava_pro_web_menu.html" marginwidth="0" marginheight="5" scrolling="no" frameborder="no" noresize>
<frame name="frObsah" marginwidth="10" marginheight="2" scrolling="auto" frameborder="no">
</frameset>
</html>
It's working with Selenium and Puppeteer, but I don't know how to execute it in an Android project. Could you help or tell me some other way to do it? I am desperate.
const puppeteer = require('puppeteer');
(async ()=>{
const browser = await puppeteer.launch({headless:false});
const page = await browser.newPage();
await page.goto("https://www.sps-tabor.cz/rozvrh-supl/Sestava_pro_web.html");
const frame = page.frames().find(frame => frame.name() === 'frObsah');
//const text = await frame.$eval('document.querySelector("#post-13008 > div > div > div > div > p")', element => element.textContent);
//const text = document.querySelector("#post-13008 > div > div > div > div > p");
const texts = await frame.$$eval("tr",els => els.map(el => el.innerText));
//const text = await frame.content();
texts.forEach(text => console.log(text));
await browser.close();
})();
Then, I also want to structure data into a table.