From 1a820b7dd1e696fabcfa17c0e80fdc006d3215a3 Mon Sep 17 00:00:00 2001 From: Adrian Rumpold Date: Sat, 19 Jun 2021 19:19:52 +0200 Subject: [PATCH] fix: Fix incidence extraction RE --- custom_components/home_assistant_covid19_augsburg/crawler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/home_assistant_covid19_augsburg/crawler.py b/custom_components/home_assistant_covid19_augsburg/crawler.py index 9be9c09..a9a6748 100644 --- a/custom_components/home_assistant_covid19_augsburg/crawler.py +++ b/custom_components/home_assistant_covid19_augsburg/crawler.py @@ -65,7 +65,7 @@ class CovidCrawler(CovidCrawlerBase): text = match.p.text _log.debug(f"Infection data text: {text}") - matches = re.search(r"(\d+,\d+) Neuinfektion", text) + matches = re.search(r"(\d+,\d+)\sNeuinfektion", text) if not matches: raise ValueError("Could not extract incidence from scraped web page")