软件使用:Python2.7 +Pycharm,稍后使用Python3.5+notepad++试试
#coding: utf-8
import urllib
def getHtml(url):
page = urllib.urlopen(url)
html = page.read()
return html
html = getHtml("http://blog.sina.com.cn/")
#coding = utf-8
import urllib
page =urllib.urlopen("http://blog.sina.com.cn/")
print page.read()