Skip to content

Instantly share code, notes, and snippets.

@philippkeller
Last active August 29, 2015 14:00
Show Gist options
  • Save philippkeller/3752e9422f847a5e3c4b to your computer and use it in GitHub Desktop.
Save philippkeller/3752e9422f847a5e3c4b to your computer and use it in GitHub Desktop.
exports csv file from goodbudget (eeba)
#!/usr/bin/env python
from requests import session
import csv
payload = {
'_username': '…',
'_password': '…',
'_remember_me': 'on',
}
cookie = {}
with session() as c:
c.get('https://goodbudget.com/login', cookies=cookie)
req = c.post('https://goodbudget.com/login_check', data=payload, cookies=cookie)
request = c.get('https://goodbudget.com/transactions/export')
lines = request.text.encode('utf-8', 'ignore').splitlines()[0:20]
input_file = csv.DictReader(lines)
for line in input_file:
# do something with line
# format is:
# {'Description': '…', 'Account': '…', 'Name': '…', 'Notes': '…', 'Envelope': '…', 'Amount': '-26.10', 'Date': '02/05/2014', 'Status': '', }
# with: name: payee, description: your notes,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment