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';
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 Comments
Sign in to comment.