From bba7e1b8ffb0743b57f202cf9cdb43fda209fa43 Mon Sep 17 00:00:00 2001 From: Tony Malto Date: Tue, 27 Mar 2018 16:36:30 +0200 Subject: [PATCH] [oney] detect revolving accounts as such --- modules/oney/pages.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/oney/pages.py b/modules/oney/pages.py index 14813dce25..f87b270fca 100644 --- a/modules/oney/pages.py +++ b/modules/oney/pages.py @@ -216,7 +216,13 @@ class CreditAccountPage(LoggedPage, HTMLPage): class get_account(ItemElement): klass = Account - obj_type = Account.TYPE_CARD + def obj_type(self): + msg = u'Crédit renouvelable auquel la carte est associée' + revolving_info_title = CleanText('//div[@id="mod-creditrenouvelable"]//span[@class="titre"]')(self) + if msg in revolving_info_title: + return Account.TYPE_REVOLVING_CREDIT + return Account.TYPE_CARD + obj__site = 'other' def obj_label(self): -- GitLab