Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fb322283c | ||
|
|
35ed25cf3f | ||
|
|
d20b48e6b1 | ||
|
|
d1438f9a0b | ||
|
|
c1b7b16251 | ||
|
|
e6c2644ea5 |
@@ -16,7 +16,7 @@ from .crawler import CovidCrawler
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
__version__ = "0.1.0"
|
__version__ = "1.3.0"
|
||||||
|
|
||||||
PLATFORMS = ["sensor"]
|
PLATFORMS = ["sensor"]
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class CovidCrawler(CovidCrawlerBase):
|
|||||||
)
|
)
|
||||||
soup = await self._fetch(url)
|
soup = await self._fetch(url)
|
||||||
|
|
||||||
match = soup.find(id="c1067628")
|
match = soup.find(id="c1075340")
|
||||||
text = match.text.strip()
|
text = match.text.strip()
|
||||||
_log.debug(f"Infection data text: {text}")
|
_log.debug(f"Infection data text: {text}")
|
||||||
|
|
||||||
@@ -167,9 +167,9 @@ class CovidCrawler(CovidCrawlerBase):
|
|||||||
result = soup.find(id=container_id)
|
result = soup.find(id=container_id)
|
||||||
text = re.sub(r"\s+", " ", result.text)
|
text = re.sub(r"\s+", " ", result.text)
|
||||||
regexes = [
|
regexes = [
|
||||||
r"(?P<total_vaccinations>\d+([.]\d+)?) Personen in Augsburg mindestens",
|
r"(?P<total_vaccinations>\d+([.]\d+)?) Personen in Augsburg",
|
||||||
r"(?P<num_vaccinated_full>\d+([.]\d+)?) Personen sind mindestens zweimal geimpft",
|
r"(?P<num_vaccinated_full>\d+([.]\d+)?) Personen in Augsburg",
|
||||||
r"(?P<num_vaccinated_booster>\d+([.]\d+)?) Personen haben eine Auffrischungsimpfung",
|
r"(?P<num_vaccinated_booster>\d+([.]\d+)?) Personen, also",
|
||||||
]
|
]
|
||||||
values = {}
|
values = {}
|
||||||
for r in regexes:
|
for r in regexes:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"domain": "covid19_augsburg",
|
"domain": "covid19_augsburg",
|
||||||
"name": "COVID-19 Augsburg",
|
"name": "COVID-19 Augsburg",
|
||||||
"version": "1.2.1",
|
"version": "1.3.0",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg",
|
"documentation": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg",
|
||||||
"issue_tracker": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg/issues",
|
"issue_tracker": "https://github.com/AdrianoKF/home-assistant-covid19-augsburg/issues",
|
||||||
|
|||||||
1021
poetry.lock
generated
1021
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "home_assistant_covid19_augsburg"
|
name = "home_assistant_covid19_augsburg"
|
||||||
version = "1.2.1"
|
version = "1.3.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Adrian Rumpold <a.rumpold@gmail.com>"]
|
authors = ["Adrian Rumpold <a.rumpold@gmail.com>"]
|
||||||
packages = [
|
packages = [
|
||||||
|
|||||||
Reference in New Issue
Block a user