Add Messages support to bnporc

Private messages from the bank.
This commit is contained in:
Laurent Bachelier 2012-03-19 19:09:00 +01:00 committed by Romain Bignon
commit a837d954ee
7 changed files with 198 additions and 13 deletions

View file

@ -20,7 +20,7 @@
from weboob.capabilities.bank import Account
from weboob.capabilities.base import NotAvailable
from weboob.tools.browser import BasePage
from weboob.tools.browser import BasePage, BrokenPageError
from ..errors import PasswordExpired
@ -86,3 +86,12 @@ class AccountsList(BasePage):
def get_execution_id(self):
return self.document.xpath('//input[@name="execution"]')[0].attrib['value']
def get_messages_link(self):
"""
Get the link to the messages page, which seems to have an identifier in it.
"""
for link in self.parser.select(self.document.getroot(), 'div#pantalon div.interieur a'):
if 'MessagesRecus' in link.attrib.get('href', ''):
return link.attrib['href']
raise BrokenPageError('Unable to find the link to the messages page')