How to use BeautifulSoup to find an html element that contains spaces in its attributes
<h1 class='td p1'>
title that i want
</h1>
<h1 class='td p2'>
title that i don't want
</h1>
<h1 class='p1'>
title that i don't want
</h1>
I would like to know how to use soup.find to find the title that i want.
Because beautifulsoup considers the attribute attrs of title 'that i want' like this: {'class': ['td', 'p1']}.<br>
But not like this: {'class': ['td p1']}