摘要: import urllib.requesturl="http://blog.csdn.net"header=("User-Agent",'User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like G 阅读全文
posted @ 2017-11-20 21:43 沧海一粒水 阅读(144) 评论(0) 推荐(0) 编辑
摘要: import urllib.requestimport urllib.errortry: data =urllib.request.urlopen("http://blog.csdn.net").read() print(data.decode())except urllib.error.URLEr 阅读全文
posted @ 2017-11-20 21:42 沧海一粒水 阅读(149) 评论(0) 推荐(0) 编辑