I have a HTML file which looks about like this:
<div class="mon_title">[CURRENT DATE]</div>
<table class="mon_list" >[contents of the table]</table>
[OHER CODE]
<div class="mon_title">[ANOTHER DATE]</div>
<table class="mon_list" >[contents of another table]</table>
[repeats a few times over]
My end-goal is to extract the tables and somehow add the corresponding date to each.
Using this code I successfully extracted only the tables:
tables = soup.find_all("table", {"class": "mon_list"})
My question is how I can extract both the date and the table and somehow add the corresponding date to each table.