fix(parser): Correctly handle incidence values without decimals

Closes #6
This commit is contained in:
Adrian Rumpold
2021-09-20 07:51:19 +02:00
parent 0d609ade9a
commit 81c19b552d
2 changed files with 2 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ class CovidCrawler(CovidCrawlerBase):
text = match.text.strip()
_log.debug(f"Infection data text: {text}")
matches = re.search(r"(\d+,\d+)\sNeuinfektion", text)
matches = re.search(r"(\d+(,\d+)?)\sNeuinfektion", text)
if not matches:
raise ValueError(
f"Could not extract incidence from scraped web page, {text=}"