No module named 'urlparse'” when I use import urlparse

Viewed 450

I'm having troubleto run this code, can anyone help me?

import sys, urllib, re, urlparse
from urllib import urlretrieve
from BeautifulSoup import BeautifulSoup

it say's ModuleNotFoundError: No module named 'urlparse'

1 Answers

For python3 use the below

from urllib.parse import urlparse
Related