Scraper not working

Hi,
I use the scraper to read out the Covid data in our region. This worked very well up to 2 weeks ago, but now there is an error message that the data could not be extracted from the HTML.

Logger: homeassistant.components.scrape.sensor
Source: components/scrape/sensor.py:155
Integration: scrape ([documentation](https://www.home-assistant.io/integrations/scrape), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+scrape%22))
First occurred: 11:32:56 (43 occurrences)
Last logged: 11:53:27

Unable to extract data from HTML for.....

Here is the configuration:

- platform: scrape
  resource: http://www.apps.nlga.niedersachsen.de/corona/iframe.php
  name: Covid Inzident
  select: "#current > table.table-region > tbody > tr:nth-child(38) > td:nth-child(5)"

Does anybody have the same Problem? Can someone help me?

Regards
Herbert

If you have HACS installed you can just use this integration: https://github.com/thebino/rki_covid
It polls the latest numbers from RKI.

If you want to use the page of Niedersachsen directly, you have to try it without “>” as it only selects the element that directly follows and not the nth element. So basically you almost had the right solution.

  - platform: scrape
    resource: http://www.apps.nlga.niedersachsen.de/corona/iframe.php
    name: Covid Inzidenz
    select: "table.table-region tbody tr:nth-child(38) td:nth-child(5)"

Hi thank you very much.

without the “>” it works. Funny. It worked before with the “>” … but now it works again.

I’ll also have a look at the other plugin.
Thank you!

1 Like