4 |
|
# |
5 |
|
# $Id$ |
6 |
|
|
7 |
< |
import common |
7 |
> |
import bank |
8 |
|
from datetime import date, datetime |
9 |
|
import re |
10 |
|
import website |
11 |
|
|
12 |
< |
class Bank(website.Website, common.Bank): |
12 |
> |
class Bank(website.Website, bank.Bank): |
13 |
|
DUE_ON = re.compile(r'DUE ON (\d{2}/\d{2}/\d{2})') |
14 |
|
|
15 |
< |
def __init__(self, username, password, debug): |
15 |
> |
def __init__(self, config, debug): |
16 |
|
website.Website.__init__(self, debug) |
17 |
+ |
bank.Bank.__init__(self, config) |
18 |
|
|
19 |
|
self.browser.open('https://www.wellsfargo.com/') |
20 |
|
self.browser.select_form(name = 'signon') |
21 |
|
|
22 |
< |
self.browser['userid'] = username |
23 |
< |
self.browser['password'] = password |
22 |
> |
self.browser['userid'] = self._username() |
23 |
> |
self.browser['password'] = self._password() |
24 |
|
|
25 |
|
self.browser.submit() |
26 |
|
|
26 |
– |
self.browser.follow_link(text = 'Accounts') |
27 |
– |
|
27 |
|
def due(self, account): |
28 |
|
try: |
29 |
|
due_on = self.Soup(self._follow_link(text_regex = account)).find(text = self.DUE_ON) |