开发者

How can I bulk query the Yahoo Weather API for more than one location at a time?

I need to load the weather for a lot of locations so I can display it on my website. What I'm doing is running an update script once an hour and caching the results of the script in a text file on my server.

But so far I have managed 开发者_如何学Goto retrieve only one location at a time, which is not efficient at all. I've thought about distributing the updates throughout the hour, but that's not ideal.

Is there any way how to get more locations from Yahoo in the same request? An example of what I'm looking for is:

http://weather.yahooapis.com/forecastrss?w=12345,43171,43411,43141


Try a YQL query:

SELECT * FROM weather.forecast WHERE location IN (90210, 12345) -- etc
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜