Skip to content

Instantly share code, notes, and snippets.

@dylan-chong
Created December 26, 2023 03:22
Show Gist options
  • Save dylan-chong/a6ee667dd1ebdcc48b4d2546a8180776 to your computer and use it in GitHub Desktop.
Save dylan-chong/a6ee667dd1ebdcc48b4d2546a8180776 to your computer and use it in GitHub Desktop.
Get HTML table data out into tsv
console.log(Array.from(document.querySelectorAll('tr')).map(tr => Array.from(tr.getElementsByTagName('td')).map(td => td.innerText).join('\t')).join('\n'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment