12
AttributeError: 'module'オブジェクトに属性 'urlopen'がありません
Pythonを使用してWebサイトの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' 私はここでガイドに従っています:http : //www.boddie.org.uk/python/HTML.html import urllib file = urllib.urlopen("http://www.python.org") s = file.read() f.close() #I'm guessing this would output the html source code? print(s) 私はPython 3を使用しています。
146
python
python-3.x
urllib