I have a table on a website and I want to scrape all tds with class='col-sm-1 available-day'
.
Using Puppeteer I tried like this:
let result = await page.evaluate(() => {
return Array.from(document.querySelectorAll('td.col-sm-1.available-day'));
});
But when I try to output the result it says that is undefined. How can I return an array of DOM nodes from evaluate
?