Created
June 30, 2023 02:53
-
-
Save oliverswitzer/78221b45461adaeaf7440c2708a9b182 to your computer and use it in GitHub Desktop.
Small browser script to extract vanguard transactions to a 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
// 1. Manually paginate through all rows of the table you want to extract a CSV from | |
// 2. Fill out the right css selector for `tableRowSelector` for the table you want to extract a csv from | |
// 2. Copy and paste the lines below into your browser console from this page: https://transactions.web.vanguard.com/ | |
const tableRowSelector = "table[aria-label='Transactions for account Your Name... — Account Name — Account Number (Self-managed)*'] tr" | |
[...document.querySelectorAll(tableRowSelector)] | |
.map(n => [...n.cells]) | |
.map(c => | |
c.map(n => `"${n.innerText}"`).join(",") | |
) | |
.join("\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment