【发布时间】:2016-12-07 04:51:42
【问题描述】:
我正在使用 import.io 为 newegg.com 编写提取器。从列表页面获取价格值时,我面临一个困难。
<div class="item-price-now">
<span>from</span>
$
<strong>108</strong>
<sup>.00</sup>
</div>
价格包含在两个节点中,strong 和 sup。我想获得 108.00 作为一个节点。当我尝试遵循 Xpath 时,我在两个节点中获取值。
//div[@class="item-price-now"]//strong/text() | //div[@class="item-price-now"]//sup/text()
提前致谢。
【问题讨论】:
标签: import.io