<div class="amlocator-store-information" style="" xpath="1">
<div class="amlocator-title" style="">The Better Health Store</div>
2420 E-Stadium Ann Arbor MI 48104<br><br>
(613) 975-6613
<div style="" class="amasty_distance" id="amasty_distance_1">Distance:
<span class="amasty_distance_number"></span>
</div>
</div>
我正在将selenium与python结合使用,并尝试从DOM中获取地址,但我不能,我用过
store_block_list = '//div[@class="amlocator-store-information"]'
store_block_list = '//div[@class="amlocator-title"]'
捕获元素,但无法获取地址,因为您可以看到地址位于// div元素之外请注意,这是一个元素列表,然后我使用for循环在元素列表周围循环
要提取地址,即2420 E-Stadium Ann Arbor MI 48104