香港天文台和空气质量健康指数数据抓取工具
安装
npm install hko-scraper
用法
var scraper = require('hko-scraper');
scraper.getWeather().then(function(weather){
console.log(weather);
});
示例输出
{ scrape_date: Mon Feb 16 2015 22:41:17 GMT+0800 (HKT),
degrees_c: 20,
humidity_pct: 90,
uv_index: 2,
uv_intensity: 'low',
weather_condition:
{ number: 77,
caption:
1