Created
July 19, 2021 11:46
-
-
Save victorhos/c1f20da3b89c9603e9823700b7eb8652 to your computer and use it in GitHub Desktop.
pega todo o extrato do nubank para jogar num csv :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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