Commit 163abc80 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[s2e] Handle unavailable value for Regexp on get_code

For some creditdunordpee accounts (a child of s2e), there is no
available AMF code so we must handle it with default=NotAvailable.
parent ad8758dd
......@@ -191,7 +191,8 @@ class AMFAmundiPage(HTMLPage):
CODE_TYPE = Investment.CODE_TYPE_AMF
def get_code(self):
return Regexp(CleanText('//td[@class="bannerColumn"]//li[contains(., "(C)")]', default=NotAvailable), r'(\d+)')(self.doc)
return Regexp(CleanText('//td[@class="bannerColumn"]//li[contains(., "(C)")]', default=NotAvailable),
r'(\d+)', default=NotAvailable)(self.doc)
class AMFSGPage(HTMLPage):
......
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