Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
added error message to c1 and nw
Browse files Browse the repository at this point in the history
  • Loading branch information
Neel Radhakrishnan committed Sep 20, 2015
1 parent 02d0821 commit d648e62
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
17 changes: 12 additions & 5 deletions banks/CapitalOne.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ def run(self):
except:
import traceback
traceback.print_exc()
self.accounts.append({'name': 'error'})

acc = {'bank': 'CapitalOne'}

acc['name'] = 'error'

acc['balance'] = 0
acc['available'] = 0

self.accounts.append(acc)

def get_accounts(self):
return self.accounts
Expand Down Expand Up @@ -70,7 +78,7 @@ def main_page(self, s, r):

soup = BeautifulSoup(r.text, 'html.parser')

acc = {'bank': 'Capital One'}
acc = {'bank': 'CapitalOne'}

acc['original_available'] = get_num(soup.find(text = 'Available to spend').parent.parent.find('div').text)
acc['limit'] = get_num(soup.find(text = 'Credit limit').parent.parent.text)
Expand Down Expand Up @@ -101,8 +109,7 @@ def main_page(self, s, r):

r = s.post('https://www.capitaloneonline.co.uk/CapitalOne_Consumer/DownLoadTransaction.do', data=d)

#filename = time.strftime('%Y%m%d') + '-' + acc['sort'] + '-' + acc['number'] + '.ofx'
#file = open(filename, 'w')
file = open('cap1.qif', 'w')
filename = time.strftime('%Y%m%d') + '-' + 'cap1.qif'
file = open(filename, 'w')
file.write(r.text)
file.close()
10 changes: 9 additions & 1 deletion banks/Nationwide.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ def run(self):
except:
import traceback
traceback.print_exc()
self.accounts.append({'name': 'error'})

acc = {'bank': 'Nationwide'}

acc['name'] = 'error'

acc['balance'] = 0
acc['available'] = 0

self.accounts.append(acc)

def get_accounts(self):
return self.accounts
Expand Down

0 comments on commit d648e62

Please sign in to comment.