Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
html示例:
<p class="si-price" data-price="910000.00">Rp 910.000</p>
所以在xidel,我这样做:
xidel -se '(//p[@class="si-price"])[1]' 'https://www.anekalogam.co.id/id'
我想要的910000是在data-price而不是Rp 910.000
910000
data-price
Rp 910.000
我可以这样做吗?
Try changing it to:
xidel -se '(//p[@class="si-price"])/@data-price' 'https://www.anekalogam.co.id/id'
Output:
905000.00 1750000.00 2595000.00 4300000.00 8550000.00 21250000.00 42400000.00 84000000.00