I am trying to learn Python to scrape a websites lunch menu using beautifulsoup. I have made the request
r = requests.get(url)
soup = BeautifulSoup(r.text, "html.parser")
And the response looks like this:
<div class="lunchRow">
<div class="lunchRowDay"><h3>Monday</h3></div>
<div class="lunchRowItem"><div class="lunchRowItemActual">Meatballs</div>
<div class="lunchRowItemActual">Soup</div>
</div>
</div>
<div class="lunchRow">
<div class="lunchRowDay"><h3>Tuesday</h3></div>
<div class="lunchRowItem"><div class="lunchRowItemActual">Chicken</div>
<div class="lunchRowItemActual">Pork</div>
<div class="lunchRowItemActual">Fish</div>
</div>
</div>
What is the easiest way to get the lunchRowItemActual for each day? I started by searching for the day and get the next div but after that I am lost and I assume this is not the way to solve it.
soup = soup.find(string="Monday").find_next('div').contents[0].text