title: Get href Attribute Link from td tag BeautifulSoup Python
body: <p>I am new in Python and someone suggested me to use Beautiful soup for Scrapping and i am struck  in a problem to fetch the href attribute from a td tag Column 2 on the basis of year in column 4.</p>
  
  <pre><code>&lt;table class="tableFile2" summary="Results"&gt;
           &lt;tr&gt;
              &lt;th width="7%" scope="col"&gt;Filings&lt;/th&gt;
              &lt;th width="10%" scope="col"&gt;Format&lt;/th&gt;
              &lt;th scope="col"&gt;Description&lt;/th&gt;
              &lt;th width="10%" scope="col"&gt;Filing Date&lt;/th&gt;
              &lt;th width="15%" scope="col"&gt;File/Film Number&lt;/th&gt;
           &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td nowrap="nowrap"&gt;8-K&lt;/td&gt;
  &lt;td nowrap="nowrap"&gt;&lt;a href="/Archives/edgar/data/320193/000119312513199324/0001193125-13-199324-index.htm" id="documentsbutton"&gt;&amp;nbsp;Documents&lt;/a&gt;&lt;/td&gt;
  &lt;td class="small" &gt;Current report, items 8.01 and 9.01
  &lt;br /&gt;Acc-no: 0001193125&lt;/td&gt;
              &lt;td&gt;2013-05-03&lt;/td&gt;
              &lt;td nowrap="nowrap"&gt;&lt;a href="/cgi-bin/browse-edgar?action=getcompany&amp;amp;filenum=000-10030&amp;amp;owner=include&amp;amp;count=40"&gt;000-10030&lt;/a&gt;&lt;br&gt;13813281         &lt;/td&gt;
           &lt;/tr&gt;
  &lt;tr class="blueRow"&gt;
  &lt;td nowrap="nowrap"&gt;424B2&lt;/td&gt;
  &lt;td nowrap="nowrap"&gt;&lt;a href="/Archives/edgar/data/320193/000119312513191849/0001193125-13-191849-index.htm" id="documentsbutton"&gt;&amp;nbsp;Documents&lt;/a&gt;&lt;/td&gt;
  &lt;td class="small" &gt;Prospectus [Rule 424(b)(2)]&lt;br /&gt;Acc-no: 0001193125&lt;/td&gt;
              &lt;td&gt;2013-05-01&lt;/td&gt;
              &lt;td nowrap="nowrap"&gt;&lt;a href="/cgi-bin/browse-edgar?action=getcompany&amp;amp;filenum=333-188191&amp;amp;owner=include&amp;amp;count=40"&gt;333-188191&lt;/a&gt;&lt;br&gt;13802405         &lt;/td&gt;
           &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td nowrap="nowrap"&gt;FWP&lt;/td&gt;
  &lt;td nowrap="nowrap"&gt;&lt;a href="/Archives/edgar/data/320193/000119312513189053/0001193125-13-189053-index.htm" id="documentsbutton"&gt;&amp;nbsp;Documents&lt;/a&gt;&lt;/td&gt;
  &lt;td class="small" &gt;Filing under Securities Act Rules 163/433 of free writing prospectuses&lt;br /&gt;Acc-no: 0001193125-13-189053&amp;nbsp;(34 Act)&amp;nbsp; Size: 52 KB            &lt;/td&gt;
              &lt;td&gt;2013-05-01&lt;/td&gt;
              &lt;td nowrap="nowrap"&gt;&lt;a href="/cgi-bin/browse-edgar?action=getcompany&amp;amp;filenum=333-188191&amp;amp;owner=include&amp;amp;count=40"&gt;333-188191&lt;/a&gt;&lt;br&gt;13800170         &lt;/td&gt;
           &lt;/tr&gt;
  &lt;/table&gt;
  
  
  
  table = soup.find('table', class="tableFile2")
  
  rows = table.findAll('tr')
  for tr in rows:
    cols = tr.findAll('td')
    if "2013" in cols[3]
      link = cols[1].find('a').get('href')
    print
  </code></pre>