I have Puppeteer setup, and I was able get all of the rows using:
let rows = await page.$$eval('#myTable tr', row => row);
Now I want for each row to get "td
's" and then get the innerText
from those.
Basically I want to do this:
var tds = myRow.querySelectorAll("td");
Where myRow
is a table row, with Puppeteer.
Two-Dimensional Array Method
You can also scrape the
innerText
into a two-dimensional array representing your table.page.$$eval()
page.evaluate()
One way to achieve this is to use evaluate that first gets an array of all the
TD's
then returns the textContent of eachTD
You could also use something like:-