title: Get subdomain from URL using Python
body: <p>For example, the address is: </p>
  
  <p><code>Address = <a href="http://lol1.domain.com:8888/some/page" rel="noreferrer">http://lol1.domain.com:8888/some/page</a></code></p>
  
  <p>I want to save the subdomain into a variable so i could do like so;</p>
  
  <pre><code>print SubAddr
  &gt;&gt; lol1
  </code></pre>