thing speak site not taking the values from the web site
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hi
im try to get the rain posibillity % value from the "www.worldweatheronline.com" but when i past the URL with a API Key on the browser it sayed "Error parsing document, try a different parse string." i used this same URL before 3 weeks a go and it is working fine withou a issue, now its not working pls help me to slove this probleam.
Parse String: //*[@id="outlook_div_wxs"]/div[2]/div[1]/dl/dd[3]
thank you...
0 comentarios
Respuestas (1)
Christopher Stapels
el 12 de Oct. de 2020
It looks like you are using ThingHTTP. The website may have changed, or there may be parts of it that have dynamic content. If some of the content changed, it could change your ability to parse another part of the document, even if that part of the document is the same.
I think a much more robust method is to use webread or webwrite in a MATLAB analysis to read from an API.
There seems to be documentation here :https://www.worldweatheronline.com/developer/api/docs/local-city-town-weather-api.aspx
An example might be
url='https://api.worldweatheronline.com/premium/v1/weather.ashx'; % add parameters of interest.
myWeather=webread(url);
They have a free trial, but you need a subscription after two months I think.
There may be other free API's if you hunt around. The scraping method can be pretty difficult to keep working.
0 comentarios
Comunidades de usuarios
Más respuestas en ThingSpeak Community
Ver también
Categorías
Más información sobre Web Services en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!