fixing index error when checking if we are on error page
This commit is contained in:
parent
272ac9f1cd
commit
cbc790eb59
1 changed files with 5 additions and 1 deletions
|
|
@ -377,7 +377,11 @@ class IndexPage(Page):
|
||||||
|
|
||||||
class MarketPage(Page):
|
class MarketPage(Page):
|
||||||
def is_error(self):
|
def is_error(self):
|
||||||
return self.document.xpath('//caption')[0].text == "Erreur"
|
try:
|
||||||
|
return self.document.xpath('//caption')[0].text == "Erreur"
|
||||||
|
except IndexError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def parse_decimal(self, td):
|
def parse_decimal(self, td):
|
||||||
value = self.parser.tocleanstring(td)
|
value = self.parser.tocleanstring(td)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue