Scrape Sensor

How do I get out the value 163 with the scrape sensor?

Helmarshausen/Diemel

Keine Meldestufe überschritten.

Letzter Messwert: 30.11.2016 09:15
Wasserstand [cm]: 163

Messwerte
Vorhersagen

Weitere Informationen: www.hlnug.de

- platform: scrape
    resource: "http://m.hochwasser.hlug.de/?pgnr=44950055#pPegel"
    name: Diemel
    #select: 'body br'
    select: 'br:nth-of-type(10)'

I can’t find a value for Wasserstand [cm] that isn’t in a graph (at www.hlnug.de). You’ll need to find that first.

When I look at http://m.hochwasser.hlug.de/?pgnr=44950055#pPegel (what you use in your resource), I don’t see any data on that page.

A tool like Firebug will help you spot the underlying HTML of the page.

Add to that that the page is a bunch of iframes. You’re going to need to determine the URL for the iframed document that you need data from and target that.

It is not possible to get the <p> value with the “Wassterstand [cm]” out of:

<p>
Letzter Messwert: 30.11.2016 09:15
<br>
Wasserstand [cm]: 163
</p>

Probably, but I don’t see it at either of the URLs you provided. Get the URL for the iframed document. For instance, http://www.hlnug.de/static/pegel/wiskiweb2/stations/44950055/station.html

But even in that doc, I don’t see “Wasserstand [cm]” in the source…

This is also going to be messy if it’s just in a

tag without a class or ID. You’re likely going to have to do some counting (nth of type). And you won’t get it from a
tag since
s aren’t containers. You’ll need to target that

tag. Then split your results on spaces. And hope the format of that page stays consistent (so the nth counting never changes).

Hmm. And looking at that page, it looks like some of the values are populated by javascript - I don’t think you can scrape those.

Thanks for your help.
Now I get the value from a complete different website. there is a class which I can “scrape”.

Problem solved then? But how. Would be nice to know so maybe others (like me :hugs:) can benefit from your experience. Thx