先来发个帖……
第一,中秋佳节祝大家节日愉快哦
第二,很久没发言了,总要扯开门面做生意啊,大家多捧场
第三,自己是新手,很多问题靠大家指点,多交流
安装,配置树莓派什么的太多了,来个不一样的!
首先,来个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/
当然,很粗略,希望大家关注这一块
我要赚赏金打赏帖 |
|
|---|---|
| bsp_log:RTT分级日志封装被打赏¥16元 | |
| J-LinkRTT常用API函数讲解被打赏¥14元 | |
| 【S32K3学习整理】S32K388 四核启动被打赏¥23元 | |
| 【S32K3学习整理】Lockstep和Decoupled 模式被打赏¥28元 | |
| 嵌入式芯片调试神器-J-LinkRTT被打赏¥21元 | |
| 人体红外PIR感应传感器使用(ESP32S3)被打赏¥26元 | |
| 一种有效完成脚本程序测试的方法被打赏¥28元 | |
| WorkBuddy搭配SolidCraft给开发板做两件式外壳被打赏¥33元 | |
| 开箱一块k230被打赏¥33元 | |
| 【瑞萨RA8D1测评】RA8D1+lwIP网络验证与TCPOTA的实验记录被打赏¥33元 | |