Reputation: 33253
Imagine that I have url
http://www.google.com/subdomain/blah-blah.../.. /..
So I want to extract 4 things from this 1) The Protocol: "http" 2) "www" 3) domain name : google" 4) "com" portion 5) subdomain par: all those after .com part But as you can see this link can be anything
ftp://google.net/hola-hola
now this might also be a valid link. So how do I extract these various portions of url using python
Upvotes: 1
Views: 118