复制代码 代码如下:import urllib2import jsonimport stringurl =’http://m.weather.com.cn/data/101090502.html’re = urllib2.urlopen(url).read()we = json.loads(re)[‘weatherinfo’]print we[‘city’] , we[‘date_y’].center(30) , we[‘week’]print we[‘temp1’], we[‘weather1’].center(30), we[‘wind1’]print we[‘temp2’], we