Skip to content

Instantly share code, notes, and snippets.

@oliverswitzer
Created June 30, 2023 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oliverswitzer/78221b45461adaeaf7440c2708a9b182 to your computer and use it in GitHub Desktop.
Save oliverswitzer/78221b45461adaeaf7440c2708a9b182 to your computer and use it in GitHub Desktop.
Small browser script to extract vanguard transactions to a CSV
// 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