js 抓取 表格数据

js 抓取 表格数据

function getData(selector) {
    return $(selector || ‘table‘).map((x, y) => group(Array.from($(y).find(‘td‘)), $(y).find(‘tr:has(td):first td‘).length, console.log($(y).find(‘tr:has(td):first td‘).length)).map(a => Array.from(a).map(b => b.textContent)).filter(x => x.length != 0))
        .filter(x => x.length != 0);
}

相关推荐