先来发个帖……
第一,中秋佳节祝大家节日愉快哦
第二,很久没发言了,总要扯开门面做生意啊,大家多捧场
第三,自己是新手,很多问题靠大家指点,多交流
安装,配置树莓派什么的太多了,来个不一样的!
首先,来个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/
当然,很粗略,希望大家关注这一块
打赏帖 | |
---|---|
【Zephyr】MCXN947 Zephyr 开发入门适配shell被打赏20分 | |
【我要开发板】6.联合MATLAB记录数据被打赏50分 | |
【瑞萨RA2E1开发板】:使用ADC功能实现位移传感器采集方案被打赏20分 | |
【nRF7002DK】基于sht30的温湿度计被打赏20分 | |
【nRF7002DK】日志打印被打赏20分 | |
rtthread硬件加密-5hash加密分析被打赏10分 | |
【STM32F769】SD卡驱动及其调试经验分享被打赏32分 | |
【分享开发笔记,赚取电动螺丝刀】使用看门狗降低系统隐藏bug触发概率被打赏18分 | |
【STM32F769】调试SD驱动,由于其时钟配置不对引起的错误以及排查记录被打赏35分 | |
【分享开发笔记,赚取电动螺丝刀】MCUXpressoConfigTools配置外设时的异常解决被打赏24分 |