中央气象局天气预报接口---java实现

一:接口地址

接口地址:

http://www.weather.com.cn/data/sk/101010100.html

http://www.weather.com.cn/data/cityinfo/101010100.html

http://m.weather.com.cn/data/101010100.html


url中的101010100是城市代码,这里是北京的城市代码。只需要改变城市代码,就可以得到所在城市的天气信息

二:java工具类调用天气接口

 


三:输出结果
中央气象局天气预报接口---java实现_第1张图片

你可能感兴趣的:(java,天气预报)