Ever wanted to download your transactions from M1 Finance’s website, but got stuck having to download 25 transactions at a time due to their terrible UX/UI? Well I have a script for you! My intent was to have a way to plot all the information on there and add trend lines among other things in a spreadsheet. I put together a Python+Bash script Frankenstein script that does that. You can pull it from my GitHub repo.
It is able to log in to M1 even if you have 2FA enabled. Though be careful with the credentials file and where you store it as it is obviously the keys to your portfolio.
The script will click on each page of your activity, download each individual CSV file, and then at the end combine it into one large CSV file with all the transactions. Then you can take that to your favorite Spreadsheet application and chart all sorts of pretty plots.