2
我必須使用python中的xpath分析以下html內容。我必須得到的內容是style-tag的內容。如何使用xpath獲取樣式標籤內容
<div class="chartBody">
<div class="chartRow">
<div class="chartLabel">Certificate</div>
<div class="chartBar_g" style="width:300px"> </div>
</div>
<div class="chartRow">
<div class="chartLabel">Protocol Support</div>
<div class="chartBar_a" style="width:210px"> </div>
</div>
</div>
包含style標籤的類是不同的。 大家可以告訴我xpath字符串,以獲取列表中的所有樣式內容嗎?
你是否真正限於用XPath和什麼樣的工具你有限嗎?使用美味湯或硒的任務相對簡單,但我們需要了解更多選擇合適的工具 – AudreyM