天气预报API接口
原文:天气预报API接口
一、中央气象台API接口:
1. XML接口
http://flash.weather.com.cn/wmaps/xml/china.xml
这个是全国天气的根节点,列出所有的省,其中的pyName字段是各个省XML的文件名,比如北京的是beijing,那就意味着北京的XML地址为
http://flash.weather.com.cn/wmaps/xml/beijing.xml
一个省的天气,其中列出该省各个市的数据,北京就列出各个区。
tmp1是最低温低,tmp2是最高温度,state1和state2是神马转神马,每个数代表一个天气现象。
2. 图片接口
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
这个图就是天气现象0(晴)的图片,其他天气现象的图片依此类推。c打头的图片是20*20像素的,b打头的是50*46像素的,d打头的是反白的图标,29*20像素,n打头的是夜间反白图标,29*20像素,注意这里的文件名是两位数字!
3. JSON接口
http://m.weather.com.cn/data/101010100.html
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
@font-face {
font-family: 'MathJax_Main';
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot'); /* IE9 Compat Modes */
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot?iefix') format('eot'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff') format('woff'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf') format('opentype'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg#MathJax_Math-Italic') format('svg');
}
@font-face {
font-family: 'MathJax_Main';
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot'); /* IE9 Compat Modes */
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot?iefix') format('eot'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff') format('woff'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf') format('opentype'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg#MathJax_Main-Regular') format('svg');
}
天气预报API接口的更多相关文章
- 聚合数据全国天气预报api接口
查询天气预报在APP中常用的一个常用功能,聚合数据全国天气预报api接口可以根据根据城市名/id查询天气.根据IP查询天气.据GPS坐标查询天气.查询城市天气三小时预报,并且支持全国不同城市天气预报查 ...
- 常用天气预报API接口整理(转)
文章转自:http://www.nohacks.cn/post-35.html 自序: 由nohacks.cn 收集整理,来源于网络,版权归原作者所有,基本收集了网络上能使用的大部分天气API接口,作 ...
- 免费天气预报API接口
一.中国气象局(http://www.weather.com.cn) 1.实时接口 http://mobile.weather.com.cn/data/sk/101010100.html http:/ ...
- 如何用全国天气预报API接口进行快速开发
最近公司项目有一个全国天气预报的小需求,想着如果用现成的API就可以大大提高开发效率,在网上的API商店搜索了一番,发现了 APISpace,它里面的全国天气预报API非常符合我的开发需求. 全国 ...
- 免费的无次数限制的各类API接口(2)
之前整理过一些聚合数据上的免费API(各类免费的API接口分享,无限次),这次还有一些其他的进行了整理,主要是聚合数据上和API Store上的一些,还有一些其他的. 聚合数据提供30大类,160种以 ...
- 各类无次数限制的免费API接口整理
各类无次数限制的免费API接口整理,主要是聚合数据上和API Store上的一些,还有一些其他的. 聚合数据提供30大类,160种以上基础数据API服务,国内最大的基础数据API服务,下面就罗列一些免 ...
- 网络免费API接口整理
转载自: https://www.cnblogs.com/doit8791/p/9351629.html 从网上看到一些免费API接口,在个人开发小程序等应用练手时可试用. 各类无次数限制的免费API ...
- 各类无次数限制的免费API接口,再也不怕找不到免费API了
各类无次数限制的免费API接口整理,主要是聚合数据上和API Store上的一些,还有一些其他的. 聚合数据提供30大类,160种以上基础数据API服务,国内最大的基础数据API服务,下面就罗列一些免 ...
- 免费API接口记录
用来记录一些无次数限制的免费API接口,主要是聚合数据上和API Store上的一些,还有一些其他的. 手机号码归属地API接口: https://www.juhe.cn/docs/api/id/11 ...
随机推荐
- [NPM] Run npm scripts in series
After creating several npm script it becomes useful to run multiple scripts back-to-back in series. ...
- Git之同一台电脑如何连接多个远程仓库
Git之同一台电脑如何连接多个远程仓库 一.总结 一句话总结: 1.git使用.git目录里面的内容(ssh或用户名密码)来自动和远程仓库通信 2.在不同的仓库中配置不同的.git目录,可以连接不同的 ...
- UE4的JSON读写方式<二>
声明:所有权利保留. 转载必须说明出处:http://blog.csdn.net/cartzhang/article/details/43794409 Json的Writer博客地址: http:// ...
- spark 2.0.2 集群搭建
由于之前已经搭建过hadoop相关环境,现在搭建spark的预备工作只有scala环境了 一,配置scala环境 1.解压tar包后,编辑/etc/profile 2.source /etc/prof ...
- iOS QLPreviewController(Quick Look)快速浏览jpg,PDF,world等
#import <QuickLook/QuickLook.h> @interface ViewController ()<QLPreviewControllerDataSource, ...
- WPF入门(三)->两个几何图形合并(CombinedGeometry)
原文:WPF入门(三)->两个几何图形合并(CombinedGeometry) 在WPF中,提供了一个CombinedGeometry对象可以使两个几何图形合并产生效果 CombinedGeom ...
- CodeForces 659E New Reform (图的遍历判环)
Description Berland has n cities connected by m bidirectional roads. No road connects a city to itse ...
- windows 安装 RabbitMQ 并添加用户 – 畅玩Coding
原文:windows 安装 RabbitMQ 并添加用户 – 畅玩Coding 1.RabbitMQ 使用 Eralng,所以需要先安装 Eralng 下载: http://www.erlang.or ...
- 零碎笔记之ServiceManager
SM是开机的时候通过init.rc文件启动的,这就保证了它是系统中第一个注册成"服务大管家"的Service,所有的service服务都需要在SM中完成注册. ServiceMan ...
- C++重载加号运算符实现两个结构体的相加
#include<iostream> #include<string> using namespace std; struct S { int a, b; string str ...