I'm trying to scrape GDP data from BEA website. The following codes returned empty. Can anyone help out what should be changed in the codes? Thanks!
function test() {
const url = 'https://apps.bea.gov/iTable/iTable.cfm?reqid=19&step=3&isuri=1&nipa_table_list=5&categories=survey';
var res = UrlFetchApp.fetch(url, { muteHttpExceptions: true }).getContentText();
var $ = Cheerio.load(res);
var table = $("#tbl_wrapper").find('td').toArray().map(el => $(el).text());
console.log(table)
}