Search code examples
pythonwindowspython-3.xrssfeed

python 3 ImportError: No module named 'urllib2'


I'm new in Python. I can not understood the error .I followed a tutorial to write the code.But it's not working

code is available in this link

http://pythonprogramming.net/scraping-parsing-rss-feed/


Solution

  • From the Python 2 documentation:

    The urllib2 module has been split across several modules in Python 3 named urllib.request and urllib.error.

    The page you link to is using Python 2. If you want to use Python 3, you will probably have to change things to make it work.