Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Adjust scraper for new site format
Browse files Browse the repository at this point in the history
Closes #5
  • Loading branch information
foosel committed Mar 18, 2020
1 parent 481e94b commit e317be7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/coronavirus_hessen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ async def async_get_data():
# Counties
for row in rows[1:-1]:
line = row.select("td")
if len(line) != 4:
if len(line) != 2:
continue

try:
county = line[0].text.strip()
cases_str = line[3].text.strip()
cases_str = line[1].text.strip()
if len(cases_str) and cases_str != "-":
cases = int(cases_str)
else:
Expand Down

0 comments on commit e317be7

Please sign in to comment.