设为首页收藏本站

Crossin的编程教室

 找回密码
 立即加入
楼主: crossin先生
打印 上一主题 下一主题

【Python 第46课】 查天气(4)

  [复制链接]

0

主题

0

好友

4

积分

新手上路

Rank: 1

楼主
发表于 2016-11-18 10:09:35 |显示全部楼层
老师,我仿照下面的代码输入之后,并没有输出东西,连乱码都没有

#coding : cp936
import urllib2
import json
url = 'http://wthrcdn.etouch.cn/weather_mini?city=北京'
content = urllib2.urlopen(url).read()
print content

求指导。。
爬虫刚入门,就爬不下去了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即加入

QQ|手机版|Archiver|Crossin的编程教室 ( 苏ICP备15063769号  

GMT+8, 2024-5-10 18:03 , Processed in 0.024782 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部