Hi i get the above error. Why does it pop up, what am I missing and how do I get around it ? Thanks
try:
import urllib.request as urllib2
except ImportError:
import urllib2
from html2text import html2text
sock = html2text(urllib2.urlopen('http://www.example.com'))
htmlSource = sock.read()
sock.close()
print (htmlSource)
Im running IDLE 3.4.3 on a Windows 7 OS.
I think I found a solution for Python 3.4. I just decoded source into UTF-8 and it worked.
Output