diff --git a/custom_components/coronavirus_hessen/__init__.py b/custom_components/coronavirus_hessen/__init__.py index 7592a22..e242eda 100644 --- a/custom_components/coronavirus_hessen/__init__.py +++ b/custom_components/coronavirus_hessen/__init__.py @@ -75,13 +75,13 @@ async def async_get_data(): for row in rows[1:]: line = row.select("td") - if len(line) != 4: + if len(line) != 5: continue try: county = line[0].text.strip() cases = parse_num(line[1].text.strip()) - deaths = parse_num(line[3].text.strip()) + deaths = parse_num(line[2].text.strip()) except: _LOGGER.exception("Error processing line {}, skipping".format(line)) continue @@ -107,4 +107,4 @@ async def async_get_data(): def parse_num(s, t=int): if len(s) and s != "-": return t(s.replace(".", "").replace(",", ".")) - return 0 \ No newline at end of file + return 0