title: Python - beautifulsoup - how to deal with missing closing tags
body: <p>I would like to scrape the table from html code using beautifulsoup. A snippet of the html is shown below. When using <code>table.findAll('tr')</code> I get the entire table and not only the rows. (probably because the closing tags are missing from the html code?)</p>
  
  <pre><code>  &lt;TABLE COLS=9 BORDER=0 CELLSPACING=3 CELLPADDING=0&gt;
    &lt;TR&gt;&lt;TD&gt;&lt;B&gt;Artikelbezeichnung&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;Anbieter&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;Menge&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;Taxe-EK&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;Taxe-VK&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;Empf.-VK&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;FB&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;PZN&lt;/B&gt;
    &lt;TD&gt;&lt;B&gt;Nachfolge&lt;/B&gt;
  
    &lt;TR&gt;&lt;TD&gt;ACTIQ 200 Mikrogramm Lutschtabl.m.integr.Appl.
    &lt;TD&gt;Orifarm
    &lt;TD ID=R&gt;     30 St
    &lt;TD ID=R&gt;  266,67
    &lt;TD ID=R&gt;  336,98
    &lt;TD&gt;&amp;nbsp;
    &lt;TD&gt;&amp;nbsp;
    &lt;TD&gt;12516714
    &lt;TD&gt;&amp;nbsp;
  
    &lt;/TABLE&gt;
  </code></pre>
  
  <p>Here is my python code to show what I am struggling with:</p>
  
  <pre><code>     soup = BeautifulSoup(data, "html.parser")
       table = soup.findAll("table")[0]
       rows = table.find_all('tr')
       for tr in rows:
           print(tr.text)
  </code></pre>