News for hackers. Stuff that matters.
Re:Ask HN: What you have automated with Python? by d0lph on Monday May 15, 2017 @10:19AM (#14341742)
I have a script that logs into my bank's web interface, and extracts my current balance. I subtract out my upcoming bills/savings transactions to tell me how much money I can spend until my next paycheck. My next step is to have it email the amount spendable every morning.

I'm using python 3, selenium, and SQLAlchemy connected to a home MySQL server.

Re:Ask HN: What you have automated with Python? by peterdemin on Monday May 15, 2017 @04:33PM (#14344872)
Check out https://peterdemin.github.io/kibitzr-banks.html It does almost the same
Re:Ask HN: What you have automated with Python? by icebraining on Tuesday May 16, 2017 @06:49PM (#14354017)
Same here, though I only store them in a plain text file.

My tip for others trying the same is to look into your bank's mobile site, if they have one. Mine was much simpler to parse, I only needed a single XPath expression to extract the number.

Also, if your bank's site is AJAX-y, look into the network tab of your browser, chances are you can find an URL that sends you a nice JSON back with the data you need.

Re:Ask HN: What you have automated with Python? by scrumper on Monday May 15, 2017 @03:02PM (#14344177)
This is a good idea and it's on my very long nice-to-have list. How are you driving the browser? Some sort of UI testing library? My bank has no API so it'd have to screen scrape.

EDIT: Sorry, I can see that it says it right there in your post: Selenium. Leaving up my stupid question as a marker of shame.

Re:Ask HN: What you have automated with Python? by x775 on Monday May 15, 2017 @11:16AM (#14342208)
That is a neat idea! I should deploy something similar. Thanks!
Re:Ask HN: What you have automated with Python? by seriousQ on Monday May 15, 2017 @10:34AM (#14341868)
Could you share your codes?
Re:Ask HN: What you have automated with Python? by d0lph on Monday May 15, 2017 @10:51AM (#14341986)
The code's a bit rough, I have a bit of cleanup to go before I publish it.
Re:Ask HN: What you have automated with Python? by brianjking on Monday May 15, 2017 @02:22PM (#14343809)
Very cool, please let me know when you release it! I'd love to check it out.