title: BeautifulSoup HTML scraping, how to get row after thead in tbody
body: <p>I'm interest in learning about scraping a website. now I learn how to scraping table on the website. I used BeautifulSoup.</p>
  
  <p>I have a simple HTML table to parse but somehow Beautifulsoup I try to get row in tbody but always get word in "thead" ones. . I'm wondering if anyone would take a look at that and see what's wrong. So I already created the rows object from the HTML table:</p>
  
  <pre><code>&lt;table id="companyTable" class="table table--zebra table-content-page width-block dataTable no-footer" role="grid" aria-describedby="companyTable_info" style="width: 868px;"&gt;
  &lt;thead&gt;
      &lt;tr role="row"&gt;
          &lt;th class="sorting_disabled" rowspan="1" colspan="1" style="width: 41px;"&gt;No&lt;/th&gt;
          &lt;th class="sorting_disabled" rowspan="1" colspan="1" style="width: 224px;"&gt;Kode/Nama Perusahaan&lt;/th&gt;
          &lt;th class="sorting_disabled" rowspan="1" colspan="1" style="width: 267px;"&gt;Nama&lt;/th&gt;
          &lt;th class="sorting_disabled" rowspan="1" colspan="1" style="width: 187px;"&gt;Tanggal Pencatatan&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr role="row" class="odd"&gt;
          &lt;td class="text-center"&gt;1&lt;/td&gt;
          &lt;td class="text-center"&gt;AALI&lt;/td&gt;
          &lt;td&gt;&lt;a href="/perusahaan-tercatat/profil-perusahaan-tercatat/detail-profile-perusahaan-tercatat/?kodeEmiten=AALI"&gt;Astra Agro Lestari Tbk&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;09 Des 1997&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr role="row" class="even"&gt;
          &lt;td class="text-center"&gt;2&lt;/td&gt;
          &lt;td class="text-center"&gt;ABBA&lt;/td&gt;
          &lt;td&gt;&lt;a href="/perusahaan-tercatat/profil-perusahaan-tercatat/detail-profile-perusahaan-tercatat/?kodeEmiten=ABBA"&gt;Mahaka Media Tbk&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;03 Apr 2002&lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p>I'm really really sorry I've already read and tried this <a href="https://stackoverflow.com/questions/38753246/beautifulsoup-html-table-parsing-only-able-to-get-the-last-row?rq=1&amp;newreg=ed7cd48d67134cd29c431ef47a1daad9">Beautifulsoup HTML table parsing--only able to get the last row?</a> . but still, don't get it.. and get '[ ]' at output.</p>
  
  <p>here's the link that I want to scrape it. : <a href="https://www.idx.co.id/perusahaan-tercatat/profil-perusahaan-tercatat/" rel="nofollow noreferrer">https://www.idx.co.id/perusahaan-tercatat/profil-perusahaan-tercatat/</a></p>
  
  <p>I want to get this row. </p>
  
  <pre><code>&lt;tr role="row" class="odd"&gt;
          &lt;td class="text-center"&gt;1&lt;/td&gt;
          &lt;td class="text-center"&gt;AALI&lt;/td&gt;
          &lt;td&gt;&lt;a href="/perusahaan-tercatat/profil-perusahaan-tercatat/detail-profile-perusahaan-tercatat/?kodeEmiten=AALI"&gt;Astra Agro Lestari Tbk&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;09 Des 1997&lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p>I try to get it but always get word in "thead" ones.</p>
  
  <p>here's my code :</p>
  
  <pre><code>from bs4 import BeautifulSoup as soup
  from urllib.request import urlopen as uReq
  url = 'https://www.idx.co.id/perusahaan-tercatat/profil-perusahaan-tercatat/'
  uClient = uReq(url)
  pageHtml = uClient.read()
  uClient.close()
  pageSoup = soup(pageHtml, "html.parser")
  table = pageSoup.findAll('table', id = "companyTable")
  table = table[0]
  for row in table.findAll('tr'):
  for cell in row.findAll('th'):
  print(cell.text)
  </code></pre>