handling website error for market place
This commit is contained in:
parent
1959e79048
commit
272ac9f1cd
2 changed files with 5 additions and 0 deletions
|
|
@ -142,6 +142,8 @@ class CaisseEpargne(Browser):
|
|||
self.page.go_history(account._info)
|
||||
if account.type is Account.TYPE_MARKET:
|
||||
self.page.submit()
|
||||
if self.page.is_error():
|
||||
return iter([])
|
||||
self.location('https://www.caisse-epargne.offrebourse.com/Portefeuille')
|
||||
elif account.type is Account.TYPE_LIFE_INSURANCE:
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -376,6 +376,9 @@ class IndexPage(Page):
|
|||
|
||||
|
||||
class MarketPage(Page):
|
||||
def is_error(self):
|
||||
return self.document.xpath('//caption')[0].text == "Erreur"
|
||||
|
||||
def parse_decimal(self, td):
|
||||
value = self.parser.tocleanstring(td)
|
||||
if value and value != '-':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue