0

Doing a crawl on a site for prices that is returning an item that looks like this in scrapy shell:

[u'\n($200.00)\n']

When I save to CSV and open in Apple Numbers the number shows as -200.00. There is another price on the same page that I scrape with no parentheses.

I'm not sure if the issue is on the site's programming, or something i'm doing in Scrapy but I can't figure it out. Maybe its the spreadsheet?

Either way, what do I have to do to return the number as a positive?

Site link i'm scraping:

https://www.ruvilla.com/nike-air-max-95-ultra-jacquard-black-dark-grey-white-silver.html

Parse code from spider:

item['price'] = sel.xpath('normalize-space(//*[@id="product_addtocart_form"]/div[2]/div[1]/div[2]/p[1]/span/text()').extract()

What do I have to do to return the number as a positive?

4

0 回答 0