<div class="card-image" style="background-image: url("https://cdn6.bigcommerce.com/s-0kvv9/images/stencil/500x659/products/170691/242554/dicemastgreenflash__36803.1503934716.jpg?c=2");">
</div>
当我输入时,
.//*[@class='card-image']/@style
它返回:
background-image:url('https://cdn6.bigcommerce.com/s-0kvv9/images/stencil/500x659/products/170691/242554/dicemastgreenflash__36803.1503934716.jpg?c=2');
我只想让它返回网址。
答案 0 :(得分:1)
这个XPath,
SELECT * from testimonials WHERE score > 8 OR (source = 'source2' AND score > 3) ORDER BY rand()
将根据要求仅选择URL。