从Yahoo Weather仅获取温度 [英] Getting only temperature from Yahoo Weather
本文介绍了从Yahoo Weather仅获取温度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从Yahoo weather API获取温度,我正在使用以下代码:
I want to get the temperature from Yahoo weather API, I am using the following code:
http://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where location%3D"48906"&format=json
我只想获取温度,而不是其他任何东西.
I just want to retrieve the temperature and not anything else.
推荐答案
我只想获取温度,而不是其他任何东西.
I just want to retrieve the temperature and not anything else.
这是一个两步过程,您需要构建请求,然后处理结果以获取温度.
Its a 2-step process, you need to build the request and then crunch the result to get the temperature.
请参阅: http://tutorialzine.com/2012/05/weather-forecast-geolocation-jquery/
和
http ://www.onextrapixel.com/2011/08/22/adding-weather-to-your-site-with-jquery-and-yql/
这篇关于从Yahoo Weather仅获取温度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文