~kolmis/wxbanker/csvimport

« back to all changes in this revision

Viewing changes to mintapi.py

  • Committer: Karel Kolman
  • Date: 2009-05-02 18:32:40 UTC
  • mfrom: (48.1.177 wxbanker-0.5)
  • Revision ID: kolmis@gmail.com-20090502183240-y9jp1y60bdxbawwn
mergeĀ 0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#    https://launchpad.net/wxbanker
2
 
#    mintapi.py: Copyright 2007-2009 Mike Rooney <michael@wxbanker.org>
 
2
#    mintapi.py: Copyright 2007-2009 Mike Rooney <mrooney@ubuntu.com>
3
3
#
4
4
#    This file is part of wxBanker.
5
5
#
43
43
    
44
44
    for name, aid in mintAccounts:
45
45
        accountPage = urllib3.read("https://wwws.mint.com/transaction.event?accountId=%s" % aid)
46
 
        balRegex = """<th>Available [^<]+</th><td class="money">([^<]+)</td>"""
 
46
        #balRegex = """<th>Available [^<]+</th><td class="money">([^<]+)</td>"""
 
47
        balRegex = """<th>Balance</th><td class="money[^>]+>([^<]+)</td>"""
47
48
        balance = re.findall(balRegex, accountPage)[0]
48
49
        print name, balance
49
50
        """https://wwws.mint.com/transactionDownload.event?accountId=223615&comparableType=8&offset=0"""
50
51
    
51
52
if __name__ == "__main__":
52
 
    main()
 
 
b'\\ No newline at end of file'
 
53
    main()