so I have multiple lists that contain links of websites:
['www.google.com', 'www.yahoo.com', 'www.amazon.com']
And I want to obtain a list as follows:
['google', 'yahoo', 'amazon']
How can I use urllib to retrieve this? I got the following:
from urllib.parse import urlparse
domain = urlparse('http://www.google.com').netloc
print(domain)
But I do not how to do it for a list and this gives as result www.google.com instead of just google.