我正在使用 beautifulsoup,但我不确定如何正确使用 find、findall 和其他功能......
如果我有:
<div class="hey"></div>
使用:soup.find_all("div", class_="hey")
将正确找到有问题的 div,但我不知道如何为以下内容执行此操作:
<h3 id="me"></h3> # Find this one via "h3" and "id"
<li id="test1"></li># Find this one via "li" and "id"
<li custom="test2321"></li># Find this one via "li" and "custom"
<li id="test1" class="tester"></li> # Find this one via "li" and "class"
<ul class="here"></ul> # Find this one via "ul" and "class"
任何想法将不胜感激:)