Hi,
Can anybody help me with a scrape sensor I am trying to enable.
It is for the public transport, believe it or not, they don’t have a working public API… need to rely on a scrape sensor.
That’s not going to work, sadly. The web site is dynamically-generated with Ajax. If you use View Source in your browser (Ctrl-U in Chrome) you’ll see that the data simply isn’t there to be read by the scrape sensor.
It pulls the data in from the response to a POST request to http://www.citram.es/HORARIOS/infoM.aspx?estacion=8_12201 (note the extra “M”) but there a complex VIEWSTATE parameter in the request which you may not be able to pull out.
This sensor returns me a “Alto” Value with is ok, but I want to map the values to numbers so I can graph them, I tried this but of course is not working: