I'm using python 3 but i've got python 2 on my computer also so I've been installing all my modules with pip3. I keep getting attribute errors.
Traceback (most recent call last):
File "/home/ro/autoblg.py", line 3, in <module>
htmlfile = urllib.urlopen("http://www.dailymail.co.uk/home/index.html")
AttributeError: 'module' object has no attribute 'urlopen'
here is my code on the last bit of code I wrote
import urllib
htmlfile = urllib.urlopen("http://www.dailymail.co.uk/home/index.html")
htmltext = htmlfile.read()
print(htmltext)
It keeps doing it with other modules I already have installed.