From 2ec5c35f22b0feb45f2095dc986348dcfaa60914 Mon Sep 17 00:00:00 2001 From: Benedikt Bastin Date: Sun, 21 Feb 2021 15:50:11 +0100 Subject: [PATCH] fix: Date parsing regex was wrong --- plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plot.py b/plot.py index 1763a76..326b3c4 100644 --- a/plot.py +++ b/plot.py @@ -152,7 +152,7 @@ data_second_vaccination = calculate_vaccination_data(impfungen['Zweitimpfung']) # Stand aus offiziellen Angaben auslesen stand = rki_file['Erläuterung'].iloc[1][0] -stand_regex = re.compile('^Datenstand: (\d\d.\d\d.\d\d\d\d, \d*\d:\d\d) Uhr$') +stand_regex = re.compile('^Datenstand: (\d\d.\d\d.\d\d\d\d, \d?\d:\d\d) Uhr$') m = stand_regex.match(stand) stand_date = datetime.datetime.strptime(m.groups()[0], '%d.%m.%Y, %H:%M') print_stand = stand_date.isoformat()