title: BeautifulSoup4 table
body: <p>I've found several articles on how to do this but i'm not having luck with any of them for bs4. Can anyone help me figure out how to pull out the <code>filename.doc</code> from this table with bs4? I've tried a million things and i'm not having much luck and cant find the answer in the documentation. <strong>There are additional tables in the html i'm scraping that have <code>&lt;table class="layout"&gt;</code></strong> </p>
  
  <p>table that i'm trying to parse:</p>
  
  <pre><code>&lt;table class="layout"&gt;
    &lt;tbody&gt;
      &lt;tr&gt;.(truncating td's).&lt;/tr&gt;
      &lt;tr&gt;.(truncating td's).&lt;/tr&gt;
      &lt;tr&gt;.(truncating td's).&lt;/tr&gt;
      &lt;tr&gt;.(truncating td's).&lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style="color:999999;"&gt;&lt;/td&gt;
        &lt;td&gt;filename.doc&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>here is the py code i am attempting. </p>
  
  <pre><code>from bs4 import BeautifulSoup
  from pprint import pprint 
  soup = BeautifulSoup(open("/home/myuser/message_tracking.html"), "html.parser")
  
  table = soup.find('table', attrs={'class':'layout'})
  print table
  table_body = table.findAll('tr')
  print table_body
  </code></pre>
  
  <p>since this table doesn't have many unique attributes that I can use, how do i pull out 'filename.doc' from this html? thank you all in advance for taking time to help!</p>