title: How to get Beautiful Soup to get link from href and class?
body: <p>I'm writing a script to download multiple FLACs from a website, and I'm using Beautiful Soup to get the flac link and downloading the links with <em>urlopen</em></p>
  
  <p>I want BS to search for a link that ends in .flac (I don't know the file name, just the extension EX: 1 file is <code>XXX.flac</code>, the other is <code>YYY.flac</code>)</p>
  
  <p>The HTML for the flac file is here </p>
  
  <pre><code>&lt;b&gt;&lt;a class=location href="/soundtracks/index.php"&gt;Soundtracks&lt;/a&gt;&lt;font class=location&gt; &amp;raquo &lt;/font&gt;&lt;a href="/soundtracks/highquality/index.php"&gt;High Quality Game 
  Soundtracks [FLAC]&lt;/a&gt;&lt;font class=location&gt; &amp;raquo &lt;/font&gt;&lt;a href="/soundtracks/highquality/Metal_Gear_20th_Anniversary/72"&gt;Metal Gear 20th Anniversary&lt;/a&gt;&lt;font class=location&gt; &amp;raquo 01 Metal Gear 20 Years History -Past, Present, Future- Download&lt;/font&gt;&lt;/b&gt;&lt;h1&gt;Metal Gear 20th Anniversary Download Links:&lt;/h1&gt;&lt;a style="font-size: 16px; font-weight:bold;" href="http://50.7.161.234/bks/94/245/Music/[029] MG 20th Anniversary [FLAC]/01 Metal Gear 20 Years History -Past, Present, Future-.flac"&gt;Metal Gear 20th Anniversary - 01 Metal Gear 20 Years History -Past, Present, Future-&lt;/a&gt; &lt;font face="Verdana" style="font-size: 16px;"&gt;Format: FLAC, Size: 76M&lt;/font&gt;&lt;br&gt; &lt;font face="Verdana" style="font-size: 10px;"&gt;&lt;b&gt;Note: If the file starts playing in your browser window, try right-clicking and "Save Target As"&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
  </code></pre>
  
  <p>I have tried to find id. <code>t = soup.find(id="flac")</code> but I don't get any relevant results. I'm quite blank on this I don't know of any way to solve it </p>
  
  <p>How would I get BS to search and find the file link and then assign that file link to a variable?</p>
  
  <pre><code>import mechanize
  import urllib, urllib2, re
  from bs4 import BeautifulSoup
  ####MECHANIZE####
  br = mechanize.Browser()
  res = br.open("http://www.emuparadise.me/soundtracks/highquality/Metal_Gear_20th_Anniversary/72")
  a = 2 #COUNTER FOR LOOP
  br.follow_link(text_regex='Download', nr=a)
  b = br.geturl() #GETS THE URL
  print b
  
  
  page = urllib2.urlopen(b).read()
  soup = BeautifulSoup(page)
  soup.prettify()
  t = soup.find(id="")
  print t
  </code></pre>