diff options
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): |