WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Nov 19, 2021. It is now read-only.

Commit e317be7

Browse files
committed
Adjust scraper for new site format
Closes #5
1 parent 481e94b commit e317be7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/coronavirus_hessen/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ async def async_get_data():
7676
# Counties
7777
for row in rows[1:-1]:
7878
line = row.select("td")
79-
if len(line) != 4:
79+
if len(line) != 2:
8080
continue
8181

8282
try:
8383
county = line[0].text.strip()
84-
cases_str = line[3].text.strip()
84+
cases_str = line[1].text.strip()
8585
if len(cases_str) and cases_str != "-":
8686
cases = int(cases_str)
8787
else:

0 commit comments

Comments
 (0)