属性错误:模块“urllib”没有属性“urlopen”是怎么回事?要怎么解决?
import sys
import urllib
url="http://www.baidu.com"
wp=urllib.urlopen(url)
content=wp.read()
fp=open("E:\\python\\web.txt","w")
fp.write(content)
fp.close()
import sys
import urllib
url="http://www.baidu.com"
wp=urllib.urlopen(url)
content=wp.read()
fp=open("E:\\python\\web.txt","w")
fp.write(content)
fp.close()
2017-06-23
举报