I am trying to get a price within a span with xpath. Since it contains a span within, the only value I get is \n:
HTML:
<span class="price--default is--nowrap is--discount">
<span class="price--label">Unser Preis:</span> 19,95 €
</span>
Try to get value with xpath:
>>> selector.xpath(".//span[contains(@class, 'price--default')]/text()").extract_first()
'\n'
Trying it with following-sibling:
>>> selector.xpath(".//span[contains(@class, 'price--default')]/following-sibling::text()").extract_first()
'\n'
How is it possible to get the price with the span tag?