fix transactions parsing

This commit is contained in:
Baptiste Delpey 2015-08-10 18:48:02 +02:00 committed by Romain Bignon
commit 36c001474c

View file

@ -121,7 +121,7 @@ class ProHistoryPage(Page):
date = parse_french_date(tr.xpath('./td[@class="date"]')[0].text.strip()) date = parse_french_date(tr.xpath('./td[@class="date"]')[0].text.strip())
status = tr.xpath('./td[@class="desc"]/ul/li[@class="first"]')[0].text.strip() status = tr.xpath('./td[@class="desc"]/ul/li[@class="first"]')[0].text.strip()
#We pass this because it's not transaction #We pass this because it's not transaction
if status in [u'Créé', u'Annulé', u'Suspendu', u'Mis à jour']: if status in [u'Créé', u'Annulé', u'Suspendu', u'Mis à jour', u'Actif']:
continue continue
raw = tr.xpath('./td[@class="desc"]/strong')[0].text.strip() raw = tr.xpath('./td[@class="desc"]/strong')[0].text.strip()
t.parse(date=date, raw=raw) t.parse(date=date, raw=raw)