I'm scraping a web and want to get the price information of all products on the first page. Below is the html of the web. I want to get 99.
<div class = 'item-bg'>
<div class = 'product-box'>
<div class = 'res-info'>
<div class = 'price-box'>
<span class = 'def-price selectorgadget_rejected'>
<i>$</i>
99
<i>.99</i>
</span>
</div>
</div>
</div>
</div>
I don't think I can use the def-price class because some products have 'selectorgadget_rejected' and some products have 'selectorgadget_suggested' after it. My code right now is
product_info = response.css('.item-bg')
for product in product_info:
product_price_sn = product.css('.price-box').extract()
It's not getting 99 and I'm not sure how to fix it. Any ideas?
