from BeautifulSoup import BeautifulSoup
html = """
<html>
<body>
    <table>
        <th><td>column 1</td><td>column 2</td></th>
        <tr><td>value 1</td><td>value 2</td></tr>
    </table>
</body>
</html>
"""
soup = BeautifulSoup(html)
tables = soup.findChildren('table')
my_table = tables[0]
rows = my_table.findChildren(['th', 'tr'])
for row in rows:
    cells = row.findChildren('td')
for cell in cells:
    value = cell.string
print('The value in this cell is %s' % value)
How do you get all the rows from a particular table using BeautifulSoup?