Open TimKieu opened 2 weeks ago
Can I see such HTML Table so I can debug it?
If your table looks like this
<table id="table-overview">
<thead>
<tr>
<th>A</th>
<th><input type="checkbox" checked></th>
<th>C</th>
</tr>
</thead>
<tbody>
<tr>
<td>A1</td>
<td>B1</td>
<td><img src='#' alt='image'>C1</td>
</tr>
<tr>
<td><a href='#'>A1</a></td>
<td><input type="checkbox" checked></td>
<td>C1</td>
</tr>
</tbody>
</table>
Then you can do this
const data = await tableParser(page, {
selector: '#table-overview',
asArray: false,
allowedColNames: {
'A': 'A',
'': 'B',
'C': 'C',
}
});
Please help. I am crawling a table which its header and one column contain DOM elements, not plain text as the examples. The error mentions about settings and conversion exception on those.