[hsbc] AttributeError("'NoneType' object has no attribute 'group'")
This error appears during the RIB lookup - it seems the page changed a little:
Module(<Backend 'hsbc'>): AttributeError("'NoneType' object has no attribute 'group'")
Here is a fix proposal:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
modified: modules/hsbc/pages/account_pages.py
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@ modules/hsbc/pages/account_pages.py:403 @ def link_rib(self, accounts):
if digit_id in CleanText('//div[@class="RIB_content"]')(self.doc):
acc.iban = re.search(
r'(FR\d{25})',
- CleanText('//div[strong[contains(text(), "IBAN")]]', replace=[(' ', '')])(self.doc)
+ CleanText('//td[contains(text(), "IBAN")]', replace=[(' ', '')])(self.doc)
).group(1)
- acc._rib_url = CleanText(Attr('//a[@class="Download"]', 'href'))(self.doc)
+ acc._rib_url = CleanText(Attr('//a[@class="RIB_bottom_donwload"]', 'href'))(self.doc)
def get_rib(self, accounts):
self.link_rib(accounts)