The new woob repository is here: This gitlab will be removed soon.

Commit c982a99c authored by Maxime Pommier's avatar Maxime Pommier Committed by Romain Bignon

[caissedepargne] Skip card that have no history/coming information and no existing check account

Closes: 41708@sibi
parent 4b2715b1
......@@ -867,6 +867,23 @@ class CardsPage(IndexPage):
raise SkipItem('immediate debit card?')
return CleanDecimal.French(TableCell('coming'), sign=lambda x: -1)(self)
def condition(self):
immediate_str = ''
# There are some card without any information. To exclude them, we keep only account
# with extra "option" (ex: coming transaction link, block bank card...)
if 'Faire opposition' in CleanText("./td[5]")(self):
# Only deferred card have this option to see coming transaction, even when
# there is 0 coming (Table element have no thead for the 5th column).
if 'Consulter mon encours carte' in CleanText("./td[5]")(self):
return True
# Card without 'Consulter mon encours carte' are immediate card. There are logged
# for now to make the debug easier
immediate_str = '[Immediate card]'
self.logger.warning('Skip card %s (no history/coming information) %s', Field('number')(self), immediate_str)
return False
class CardsComingPage(IndexPage):
def is_here(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment