Html parse value

Hi,
I would like to parse the value of the frequency (currently 50.011 Hz) from the website https://www.netzfrequenz.info/. Unfortunately I don't have a idea how to do that.

I have set the following:
Do you have a hint what I have to set?
i have a guess that i have chosen a wrong selector

here the whole flow

[{"id":"3ab27a41.60baa6","type":"inject","z":"dbd92bb5.58bb68","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":270,"y":580,"wires":[["6f88489b.7f3f88"]]},{"id":"6f88489b.7f3f88","type":"http request","z":"dbd92bb5.58bb68","name":"https://www.netzfrequenz.info/","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://www.netzfrequenz.info/","tls":"","persist":false,"proxy":"","authType":"","x":520,"y":580,"wires":[["75d0dac2.a64df4","c259c87fb199432a"]]},{"id":"6957b0.d583785","type":"switch","z":"dbd92bb5.58bb68","name":"Inhalt testen","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"Aktuelle Netzfrequenz","vt":"str","case":true},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1130,"y":480,"wires":[["56293aaf9df4bbae"],[]]},{"id":"75d0dac2.a64df4","type":"html","z":"dbd92bb5.58bb68","name":"Text suchen","property":"payload","outproperty":"payload","tag":"#frequenz","ret":"text","as":"multi","x":880,"y":480,"wires":[["6957b0.d583785","e5e53dea916dc3cf"]]},{"id":"56293aaf9df4bbae","type":"debug","z":"dbd92bb5.58bb68","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1400,"y":460,"wires":[]},{"id":"e5e53dea916dc3cf","type":"debug","z":"dbd92bb5.58bb68","name":"TEST FREQUENZ","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1160,"y":400,"wires":[]},{"id":"c259c87fb199432a","type":"debug","z":"dbd92bb5.58bb68","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":880,"y":640,"wires":[]}]

thanks a lot for your help!

that looks like a rather dynamic page so will be hard to parse - but if you dig in quite a way you can find that it is actually this url you need to request - https://www.netzfrequenz.info/json/act.json

1 Like

Wow great - thank you so much!!! So it works perfectly!

Is there also a json object for this page? Aktuelle Netzkennzahlen

Please excuse my imprecise question. Is there also a way to read out the marked value (currently 49.987 Hz) with JSON? That would be great

Website: Aktuelle Netzkennzahlen

The data seems to be from https://www.swissgrid.ch/bin/services/apicache?path=/content/swissgrid/de/home/operation/grid-data/current-data/jcr:content/parsys/chart_copy
which is a complete json object for the chart and data.

1 Like

That's great! thank you very, very much!
One last question: where do you get the information from the source code?

In both cases I used the browser dev tools window to look at the network tab to see the live traffic
eg


Then looked at the url they were constantly reloading...

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.