第三方提供的气象接口:
http://www.pm25.in 可以去查看api,如何使用
中央气象台web接口:
1.一级城市获取http://www.weather.com.cn/data/city3jdata/china.html
2.二级城市获取,通过后缀为一级城市id,得到所有二级城市的短id
http://www.weather.com.cn/data/city3jdata/provshi/10125.html
3.通过一级城市id+二级城市短id,获取二级城市下对应的城市列表
http://www.weather.com.cn/data/city3jdata/station/1012501.html
4.通过最终的城市id,获取中央气象台提供的天气信息
http://m.weather.com.cn/data/101250101.html
5.获取天气图标
http://m.weather.com.cn/img/c0.gif
http://m.weather.com.cn/img/b0.gif
http://www.weather.com.cn/m/i/weatherpic/29x20/d0.gif
http://www.weather.com.cn/m2/i/icon_weather/29x20/n00.gif
湖南为例:
http://www.weather.com.cn/data/city3jdata/china.html
{
10101: "北京",
10102: "上海",
10103: "天津",