title: How do I scrape the link from an <a> string in one line?
body: <p>I'm working on a web scraper and it has many different variables so keeping each variable to a single line is important to me. The current variable I am working on I have down to this:</p>
  
  <pre><code>&lt;a href="http://website.com/example/123" target="_blank"&gt;Example&lt;/a&gt;
  </code></pre>
  
  <p>Is there any simple way I can simply get the website (<code>http://website.com/example/123</code> in this case) scrapped out in one line of code? </p>
  
  <p>I'm currently using urllib, re, and BeautifulSoup so any of those libraries are fine. I tried adding</p>
  
  <pre><code>.find('a', attrs={'href': re.compile("^http://")})
  </code></pre>
  
  <p>to the end of my line, but it made the output return nothing.</p>