PDA

View Full Version : Extract product-price from URL in Excel VB



dudester
09-16-2018, 12:46 AM
Hi,

I am new to web scraping with Excel, I want to extract the product price to a variable from a url, the snippet of relevant HTML is below, the line <span class="price">$120.95 AUD</span> is the value I want to extract but I cant get my coding right to pick it up, what is the best way to do this?



Thank you




<div class="product-price">


<span class="product-price__price product-price__sale">
<span class="price">$120.95 AUD</span>
<span class="product-price__sale-label"><span class="brackets skeleton-loading" data-trans-key="products.product.on_sale">Sale</span></span>
</span>

<span class="visually-hidden"><span class="brackets skeleton-loading" data-trans-key="products.product.regular_price">Regular price</span></span>
<span class="product-price__price compare_price"><span class="price">

$130.95 AUD
</span></span>


</div>