1 2 3 4 5 6
import sys from urlparse import urlparse for url in sys.stdin: o = urlparse(url) print o.netloc