From c1b7b16251a49df94c2cfce2345078dc97379ff8 Mon Sep 17 00:00:00 2001 From: Adrian Rumpold Date: Fri, 18 Mar 2022 09:00:15 +0100 Subject: [PATCH] fix: Update div IDs to mnatch new page structure --- .../home_assistant_covid19_augsburg/crawler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/home_assistant_covid19_augsburg/crawler.py b/custom_components/home_assistant_covid19_augsburg/crawler.py index 13cdc76..a16e2f9 100644 --- a/custom_components/home_assistant_covid19_augsburg/crawler.py +++ b/custom_components/home_assistant_covid19_augsburg/crawler.py @@ -109,7 +109,7 @@ class CovidCrawler(CovidCrawlerBase): ) soup = await self._fetch(url) - match = soup.find(id="c1067628") + match = soup.find(id="c1075340") text = match.text.strip() _log.debug(f"Infection data text: {text}") @@ -167,9 +167,9 @@ class CovidCrawler(CovidCrawlerBase): result = soup.find(id=container_id) text = re.sub(r"\s+", " ", result.text) regexes = [ - r"(?P\d+([.]\d+)?) Personen in Augsburg mindestens", - r"(?P\d+([.]\d+)?) Personen sind mindestens zweimal geimpft", - r"(?P\d+([.]\d+)?) Personen haben eine Auffrischungsimpfung", + r"(?P\d+([.]\d+)?) Personen in Augsburg", + r"(?P\d+([.]\d+)?) Personen in Augsburg", + r"(?P\d+([.]\d+)?) Personen, also", ] values = {} for r in regexes: