Help with scraper

I’m trying to scrape the Kilowatt hours field from this site.

This is what I’ve got.

  - platform: scrape
    name: "SUB Rate"
    select: "#residential_electric_kilowatt_hours"
    index: 0
    unit_of_measurement: "$/Kwh"

Any idea what I’m doing wrong?


The HTML element does not actually contain the desired data when you fetch the raw HTML. What you see in the web browser is not what the scrape integration sees.

But you might be in luck, because it appears that the actual data is fetched as JSON from this URL and you could try using the rest integration to find the value you are looking for:

1 Like

Awesome. Thanks! Took me a minute to figure out how you found that. I didn’t realize I could just plug js/site.js into the path and see the javascript.

1 Like