diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2018-11-21 02:03:01 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2018-11-21 02:03:23 +0100 |
commit | ffddda74331a3a95d9ae48c0a499d8e8e377a1f5 (patch) | |
tree | e5af158f8c586aa67c82e3ba928f4cb5077e82d6 /jobs/prix_carburant.py | |
parent | a3d8917f34162ddf1d9854ac70799a23bcc6cef3 (diff) | |
download | datasources-ffddda74331a3a95d9ae48c0a499d8e8e377a1f5.tar.gz datasources-ffddda74331a3a95d9ae48c0a499d8e8e377a1f5.zip |
Filter 'rupture de stock' from prix-carburant
Diffstat (limited to 'jobs/prix_carburant.py')
-rwxr-xr-x | jobs/prix_carburant.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jobs/prix_carburant.py b/jobs/prix_carburant.py index 21e6c26..0f3eb86 100755 --- a/jobs/prix_carburant.py +++ b/jobs/prix_carburant.py @@ -6,6 +6,8 @@ from html.parser import HTMLParser from urllib import request +rupture = 'Rupture de stock' + class Station: def __init__(self): self.station_name = "" @@ -14,6 +16,7 @@ class Station: def clean(self): self.prices = filter(lambda kv: kv[1] != '', self.prices.items()) + self.prices = filter(lambda kv: kv[1] != rupture, self.prices) self.prices = dict(map(lambda kv: (kv[0], float(kv[1])), self.prices)) def __repr__(self): |