I want to extract the domain name(name of the site+TLD) from a list of URLs which may vary in their format. for instance: Current state---->what I want
mai
Using python tld
https://pypi.python.org/pypi/tld
$ pip install tld
from tld import get_tld print get_tld("http://www.google.co.uk/some-page/some-sub-page/") 'google.co.uk'