I have two cases where i want to scrape html tags with custom html attributes
This is the example of the html. How do you scrape all the elements with the custom attribute "limit".
<div class="names" limit="10">Bar</div>
<div id="30" limit="20">Foo</div>
<li limit="x">Baz</li>
The second case is similar but with all the same html tags
<div class="names" limit="10">Bar</div>
<div class="names" limit="20">Bar</div>
<div class="names" limit="30">Bar</div>
My question is different than How to find tags with only certain attributes - BeautifulSoup because the latter targets attribute values with a specific tag whereas my question finds attributes only regardless of tag or value
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…