ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FreeBSDAdmin/Reminder/wellsfargo.py
Revision: 1131
Committed: 2008-12-21T01:48:02-08:00 (16 years, 6 months ago) by douglas
Content type: text/x-python
File size: 735 byte(s)
Log Message:
I, for one, welcome our new Google overlords. At least their Calendar integration with my G1.

File Contents

# Content
1 # Wells Fargo
2 #
3 # Douglas Thrift
4 #
5 # $Id$
6
7 from datetime import datetime
8 import re
9 import website
10
11 class Bank(website.Website):
12 def __init__(self, username, password, debug):
13 website.Website.__init__(self, debug)
14
15 self.browser.open('https://www.wellsfargo.com/')
16 self.browser.select_form(name = 'signon')
17
18 self.browser['userid'] = username
19 self.browser['password'] = password
20
21 self.browser.submit()
22
23 self.browser.follow_link(text = 'Accounts')
24
25 def __call__(self, account):
26 due_on = re.compile(r'DUE ON (\d{2}/\d{2}/\d{2})')
27
28 try:
29 return datetime.strptime(due_on.search(self.Soup(self.browser.follow_link(text_regex = account)).find(text = due_on)).group(1), '%m/%d/%y').date()
30 finally:
31 self.browser.back()

Properties

Name Value
svn:keywords Id