Skip to content

Instantly share code, notes, and snippets.

What would you like to do? scrape table to csv eg. for Excel
var rows_all = document.getElementsByTagName("table")[4].children[0].children
var rows =, 2)
var rows_data = { return, function(c, i) { var v = c.innerText; return i===2 ? v.replace("\n"," ") : v }) })
// poor man's csv - doesn't handle values with the delimiter itself!
console.log( { return c.join(",") }).join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment