support loan accounts

This commit is contained in:
Romain Bignon 2014-04-04 19:24:46 +02:00
commit cedae69840
2 changed files with 21 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright(C) 2013 Romain Bignon
# Copyright(C) 2013-2014 Romain Bignon
#
# This file is part of weboob.
#
@ -98,6 +98,13 @@ class IndexPage(BasePage):
account.label = self.parser.tocleanstring(line)
yield account
def get_loan_balance(self):
xpath = '//table//td/strong[contains(text(), "Montant emprunt")]/../../td[2]'
try:
return - Decimal(FrenchTransaction.clean_amount(self.parser.tocleanstring(self.document.xpath(xpath)[0])))
except IndexError:
return None
def get_card_name(self):
return self.parser.tocleanstring(self.document.xpath('//h1')[0])