相关疑难解决方法(0)

AttributeError:'module'对象没有属性'urlopen'

我试图使用Python下载网站的HTML源代码,但我收到此错误.

回溯(最近通话最后一个):
文件"C:\用户\ Sergio.Tapia \文档\的NetBeansProjects\DICParser的\ src\WebDownload.py",3号线,在文件=了urllib.urlopen(" HTTP://www.python .ORG ")AttributeError的:'模块’对象没有属性'的urlopen’

我在这里以下指南:http://www.boddie.org.uk/python/HTML.html

Traceback (most recent call last):  
    File "C:\Users\Sergio.Tapia\Documents\NetBeansProjects\DICParser\src\WebDownload.py", line 3, in <module>
     file = urllib.urlopen("http://www.python.org")
AttributeError: 'module' object has no attribute 'urlopen'
Run Code Online (Sandbox Code Playgroud)

我正在使用Python 3,感谢您的帮助!

python urllib python-3.x

126
推荐指数
5
解决办法
24万
查看次数

标签 统计

python ×1

python-3.x ×1

urllib ×1