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

Commit a360f003 authored by Christophe François's avatar Christophe François Committed by Vincent A

[aviva] Handle empty investment_detail page

Sometimes the investment detail page is empty, with no error displayed.
parent 65a3e217
......@@ -22,7 +22,7 @@
from weboob.browser import LoginBrowser, need_login
from weboob.browser.url import BrowserParamURL
from weboob.capabilities.base import empty, NotAvailable
from weboob.capabilities.base import empty
from import Account
from weboob.exceptions import (
BrowserIncorrectPassword, BrowserPasswordExpired,
......@@ -116,11 +116,11 @@ def iter_investment(self, account):
if not empty(inv.code):
# Need to go first on InvestDetailPage...
# then request the InvestPerformancePage tab
inv.unitprice = inv.diff_ratio = inv.description = NotAvailable
# Sometimes the page loads but there is no info
if not
# then request the InvestPerformancePage tab
yield inv
......@@ -271,7 +271,8 @@ def on_load(self):
class InvestDetailPage(LoggedPage, HTMLPage):
def is_empty(self):
return not self.doc.xpath('//table')
class InvestPerformancePage(LoggedPage, 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