I used the Google Weather API to get weather information, but it seems Google has stopped serving. And now I'm trying to switch to the Yahoo Weather API.
var WOEID = 2502265;
$.ajax({
url: "http://weather.yahooapis.com/forecastjson?w=" + WOEID + "&u=c",
dataType: 'json',
success: function(data) {
console.log(data);
}
});
However, is there a way that I can only get the WOEID using JavaScript? Because then I can just do
http:
and what is he.
He says on the Yahoo weather API page ,
To find your WOEID, search or find your city on the weather home page. The WOEID is in the URL of the forecast page for this city. You can also get a WOEID by entering your zip code on the home page.
But I want to get it via JavaScript, and not manually go to weather.yahoo.com and find out WOEID.
Cross-Origin, Chrome, .