先来发个帖……
第一,中秋佳节祝大家节日愉快哦
第二,很久没发言了,总要扯开门面做生意啊,大家多捧场
第三,自己是新手,很多问题靠大家指点,多交流
安装,配置树莓派什么的太多了,来个不一样的!
首先,来个raspberry+web+python+json+在线天气预报 201409081330
python里面的json解析器很容易上手哈
效果截图:
程序:
weather_json_dec.py
#============start=============
import urllib
import json
url = 'http://www.weather.com.cn/data/sk/101040100.html';
page = urilib.urlopen(url);
data = page.read();
ddata = json.loads(data);
print("city:")
print ddata['weatherinfo']['city'],ddata['weatherinfo']['cityid']
print ddata['weatherinfo']['time']
print ("temperature:")
print ddata['weatherinfo']['temp']
#=============end==============
参考链接:
1.http://www.360doc.com/content/13/1224/00/8504707_339644557.shtml
2.http://blog.csdn.net/hello_haozi/article/details/7564223
3.http://www.eepw.com.cn/event/action/RPi_DIY/
当然,很粗略,希望大家关注这一块
我要赚赏金打赏帖 |
|
|---|---|
| PCF8574功能模块及其使用被打赏¥20元 | |
| 传感器LSM6DSO及LIS3MDL的功能检测被打赏¥18元 | |
| LPS25HB气压传感器及其检测被打赏¥18元 | |
| HTS221温湿度传感器及其检测被打赏¥18元 | |
| 【S32K3XX】HSE FW 版本更新被打赏¥21元 | |
| 基于ArduinoUNO开发板的AT24C02读写测试被打赏¥16元 | |
| TCS3472S传感器及其色彩检测被打赏¥19元 | |
| 【S32DS】S32K3 RTD7.0.1 HSE 组件配置报错问题解决被打赏¥27元 | |
| 【S32K3XX】MCME 启动 CORE1被打赏¥23元 | |
| AG32VH407下温度大气压传感器及其检测被打赏¥20元 | |