Skip to content

Instantly share code, notes, and snippets.

@victorhos
Created July 19, 2021 11:46
Show Gist options
  • Select an option

  • Save victorhos/c1f20da3b89c9603e9823700b7eb8652 to your computer and use it in GitHub Desktop.

Select an option

Save victorhos/c1f20da3b89c9603e9823700b7eb8652 to your computer and use it in GitHub Desktop.
pega todo o extrato do nubank para jogar num csv :)
var csv = ''
var columns = document.getElementsByClassName("charge");
for (var i = 0; i < columns.length; i++) {
item = document.getElementsByClassName("charge").item(i);
date = item.getElementsByClassName("date")[0].textContent;
description = item.getElementsByClassName("description")[0].textContent;
amount = item.getElementsByClassName("amount")[0].textContent;
csv += date + ";" + description + ";" + amount.replace(",", ".") + ";\n";
}
console.log(csv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment