Alex_XT的博客

Kevin-XT

模板样式测试

h3样式

插入代码效果:

 1 import requests
 2 import json
 3 
 4 r = requests.get('http://wthrcdn.etouch.cn/weather_mini?city=杭州')
 5 r.encoding = 'utf-8'
 6 print(r.text)
 7 print()
 8 
 9 dic = json.loads(r.text)
10 print(dic,type(dic))
11 
12 ret = json.load(open('db','r',encoding='utf-8'))#将读入文件,反序列化为Python类型数据
13 print(ret)
Test Code
import requests
import json

r = requests.get('http://wthrcdn.etouch.cn/weather_mini?city=杭州')
r.encoding = 'utf-8'
print(r.text)
print()

dic = json.loads(r.text)
print(dic,type(dic))

ret = json.load(open('db','r',encoding='utf-8'))#将读入文件,反序列化为Python类型数据
print(ret)

  

 

posted @ 2017-09-17 10:16  suntim  阅读(142)  评论(3)    收藏  举报