Commit 93f56266 authored by Damien Mat's avatar Damien Mat Committed by ntome

[bpe] Modified regex to catch contract number

Take into acccount letter occurences such as '60181576 E7 02'

Closes: 11364@zendesk
parent fd5d7656
......@@ -357,7 +357,7 @@ class HistoryPage(LoggedPage, JsonPage):
class LifeinsurancePage(LoggedPage, HTMLPage):
def get_account_id(self):
account_id = Regexp(CleanText('//h1[@class="portlet-title"]'), r'n° ([\d\s]+)', default=NotAvailable)(self.doc)
account_id = Regexp(CleanText('//h1[@class="portlet-title"]'), r'n° ([\s\w]+)', default=NotAvailable)(self.doc)
if account_id:
return re.sub(r'\s', '', account_id)
......
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