How can I import urlparse in python-3?

1.2K    Asked by DeepakMistry in Python , Asked on Apr 14, 2021

 I want to use the urlparse package. But it seems that the python3.4.1 is not able to find the module.

When I import urlparse, it is giving me this error:

importError: no 'module' named ulrparse

Answered by Deepak Mistry

Please be informed that the python 3 urlparse was renamed to urllib.parse in Python 3. So, if you have a code such as:

 urlparse import urljoin

I suggest you change it to:

from urllib.parse import urljoin



Your Answer

Interviews

Parent Categories