I'm Using Beautifulsoup to turn the data in this table to a json. However, how do I get the data between the tags?
<table>
<tr>
<th>Montag</th>
<td>
09:00 – 00:30
</td>
</tr>
<tr>
<th>Dienstag</th>
<td>
geschlossen
</td>
</tr>
<tr>
<th>Mittwoch</th>
<td>
12:00 – 00:30
</td>
</tr>
<tr>
<th>Donnerstag – Sonntag</th>
<td>
09:00 – 00:30
</td>
</tr>
</table>
Unfortunately, this is not working:
datesTable = BeautifulSoup(mytable)
for row in datesTable:
print(row['th'])