2018-03-02 17059
一、中央气象台API接口:
1. XML接口
http://www.weather.com.cn/data/sk/101010100.html
http://www.weather.com.cn/data/cityinfo/101010100.html
各个城市的代码,自己百度一下。例如:北京的代码就是101010100
二、中华万年历API接口:
1、JSON
http://wthrcdn.etouch.cn/weather_mini?city=北京
http://wthrcdn.etouch.cn/weather_mini?citykey=101010100
2、XML
http://wthrcdn.etouch.cn/WeatherApi?city=北京
http://wthrcdn.etouch.cn/WeatherApi?citykey=101010100
三、新浪天气API接口:
http://php.weather.sina.com.cn/xml.php?city=%B9%E3%D6%DD&password=DJOYnieT8234jlsK&day=1
city=城市的URL编码(广州:%B9%E3%D6%DD)。
password固定。
day=0,表示当天天气,1表示第二天天气,以此类推,最大取值为4。
新浪天气图片:
78*78:
白天:http://php.weather.sina.com.cn/images/yb3/78_78/duoyun_0.png
夜间:http://php.weather.sina.com.cn/images/yb3/78_78/duoyun_1.png
180*180:
白天:http://php.weather.sina.com.cn/images/yb3/180_180/duoyun_0.png
夜间:http://php.weather.sina.com.cn/images/yb3/180_180/duoyun_1.png
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。