1 some tags like:
<span class="ABCD">XXXX</span>
if you want to use the CSS selector to get the tag, you can write code for the class attribute as follows:
spans = beautifulsoup.select('span.ABCD')
2 And if you want to use this for the id attribute, change it like this:
<span id="A">XXXX</span>
change the character you use in the select function:
span = beautifulsoup.select('span
What we learned is that its grammar is similar to CSS3
accfcx
source share