title: Extract domain from URL in python
body: <p>I have an url like:<br>
  <code>http://abc.hostname.com/somethings/anything/</code>  </p>
  
  <p>I want to get:<br>
  <code>hostname.com</code>  </p>
  
  <p>What module can I use to accomplish this?<br>
  I want to use the same module and method in python2.</p>