async function scrapeTableData(url) {
const response = await soFetch(url);
const text = await response.text();
const dom = html`${text}`;
const tables = await dom.querySelectorAll('table');
if (tables.length <= 0) {
throw new Error('Could not find any tables.');
}
const tablesLen = tables.length;
const tablesData = [];
for (let i = 0; i < tablesLen; i++) {
let tableEl = tables[i];
tablesData.push(tableEl);
}
return tablesData;
}