I am writing extractor for newegg.com using import.io. I am facing one difficulty while grabbing price values from listing page.
<div class="item-price-now">
<span>from</span>
$
<strong>108</strong>
<sup>.00</sup>
</div>
Price enclosed in two nodes, strong and sup. I want to get 108.00 as one node. When i tried following Xpath, i get values in two nodes.
//div[@class="item-price-now"]//strong/text() | //div[@class="item-price-now"]//sup/text()
Thanks in advance.
You could use an xpath to just grab all the text within the div, then use a regular expression to filter it just to the text after the dollar.
xpath:
//div[@class='item-price-now']->from $108.00regex:
\$d+\.\d+->$108.00