0
我正在和TFHpple一起工作,我想要在一個div標籤中獲得所有的圖片url,圖片的數量可能非常大,所以它需要動態變化。下面是HTMLXpath獲取多個img的div
<div id="images" class="content">
<div class="galleria">
<img data-thumb="https://s3.amazonaws.com/nakedapartments/images/78659582/mthumb.jpg?1453414352" alt="" class="hidden" src="https://s3.amazonaws.com/nakedapartments/images/78659582/large.jpg?1453414352" />
<img data-thumb="https://s3.amazonaws.com/nakedapartments/images/78659608/mthumb.jpg?1453414354" alt="" class="hidden" src="https://s3.amazonaws.com/nakedapartments/images/78659608/large.jpg?1453414354" />
<img data-thumb="https://s3.amazonaws.com/nakedapartments/images/78659634/mthumb.jpg?1453414356" alt="" class="hidden" src="https://s3.amazonaws.com/nakedapartments/images/78659634/large.jpg?1453414356" />
</div>
</div>
到目前爲止,我只能夠讀取第一個和使用此路徑將在src到一個數組:
//div[@class='content']/div[@class='galleria']/img
任何一個可以點我在正確的方向獲取div中存在的所有src屬性到我的數組中?謝謝!