fix website changes (virtual keyboard, accounts list) closes #1696

This commit is contained in:
Romain Bignon 2014-12-18 11:27:09 +01:00
commit 4530278c1e
3 changed files with 12 additions and 13 deletions

View file

@ -56,8 +56,6 @@ class BoursoramaModule(Module, CapBank):
yield account yield account
def get_account(self, _id): def get_account(self, _id):
if not _id.isdigit():
raise AccountNotFound()
with self.browser: with self.browser:
account = self.browser.get_account(_id) account = self.browser.get_account(_id)
if account: if account:

View file

@ -49,7 +49,7 @@ class AccountsList(Page):
# ignore account # ignore account
break break
account.type = Account.TYPE_CARD account.type = Account.TYPE_CARD
account.label = self.parser.tocleanstring(a) account.label, account.id = [s.strip() for s in self.parser.tocleanstring(td).rsplit('-', 1)]
try: try:
account._link_id = td.xpath('.//a')[0].get('href') account._link_id = td.xpath('.//a')[0].get('href')
except KeyError: except KeyError:
@ -62,6 +62,7 @@ class AccountsList(Page):
# ignore account # ignore account
break break
account.label = self.parser.tocleanstring(span) account.label = self.parser.tocleanstring(span)
account.id = self.parser.tocleanstring(td).rsplit('-', 1)[-1].strip()
try: try:
account._link_id = td.xpath('.//a')[0].get('href') account._link_id = td.xpath('.//a')[0].get('href')
account._detail_url = account._link_id account._detail_url = account._link_id

View file

@ -27,16 +27,16 @@ from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard
class VirtKeyboard(MappedVirtKeyboard): class VirtKeyboard(MappedVirtKeyboard):
symbols={'0':'40fdd263e99d7268b49e22e06b73ebf1', symbols={'0':'cb9af3f561915702fc7f8ebaed8d5024',
'1':'0d53ac10dba67d3ec601a086d0881b6f', '1':'6154d49517dce772aedb581db6587f12',
'2':'91b6e36e32ef8650127367a076b03c34', '2':'e8b1f8242ff536a807a91e521921a6ea',
'3':'bbda594275b7999fdac947e2499e7884', '3':'55ae6e699ff2a09c97e58dbad410d2d5',
'4':'26cd3d8f2279b5ec2be6d6f2be1e9c78', '4':'b23b8dfe923349f2b082b0a30965dd49',
'5':'408ceca0885b6ae720745531587f2766', '5':'b0f2d0f28662c32ad82233313a4074f6',
'6':'9008178542bdad8b9cbcd4d8a551f2fa', '6':'ffb10411571a767e9f6e7c8229a5bdac',
'7':'3ab5c3555f36617d264d4938f487480c', '7':'ba8650fd57b2648ca91679d574150a9b',
'8':'c06676612c15345c3634af51c058e64f', '8':'cbf9b18012499c023f1e78dcc3611cce',
'9':'d8323299dd4bd6489480b1e402fa5bcc' '9':'c70a99af7bc6a03f28b1217e58363ecf'
} }
color=(0,0,0) color=(0,0,0)