Split up a URL of the form http://www.something.com : URL « Network « Python






Split up a URL of the form http://www.something.com

 
url = raw_input('Please enter the URL: ')
domain = url[11:-4]

print "Domain name: "+ domain

           
         
  








Related examples in the same category

1.URL joinURL join
2.URL SplitURL Split
3.URL unsplitURL unsplit
4.URL unsplit and splitURL unsplit and split
5.Open a URL and read a web page
6.URL open and read