title: Detecting a short url using Python
body: <p>Sorry if this has been addressed previously, but I couldn't find any prior solutions to this. I'm using Pandas to extract domains from URLs and count the results. Is there a way to assign a boolean value depending on whether or not URLs are short links such as bit.ly and goo.gl? Can urllib.urlopen be used to verify that a link is a short link? </p>
  
  <p>Here's pseudo-Python that hopefully illustrates what I'm trying to do:</p>
  
  <pre><code>if urllib.urlopen(df['url']) != df['url']:
      df['short_url'] = True
  else:
      df['short_url'] = False
  </code></pre>