Using Python and BS4 I'm trying to scrape birthdates out of Wikipedia articles. They are written as
<span class="bday">1999-12-31</span>
So I used
page.find("span",{"class":"bday"})
to find all birthdates from a list of Wikipedia articles. But unfortunately that also returned the following tag:
<span class="bday dtstart published updated">1999</span>
Now I'm confused. I would expect "bday" to only give me results consisting exactly of that. If I wanted to search everything containing 'bday' I would use something like "bday*". So how can I avoid that? How can I tell BeautifulSoup to only give me results exactly matching "bday".