I am trying to extract the value 'Netcare Ltd', but can't make it work.
<h1 class="secondary-header">
<span class='marketNameHeader'>Netcare Ltd</span>
<span class='diaryNoteAddButtonContainer'></span>
</h1>
I have tried the following (and various other options), but not sure where I am going wrong. Any ideas what I am missing?
name = soup.find('span', attrs={'class':'marketNameHeader'}).text