Store: Fix price for Smashwords store.

This commit is contained in:
John Schember 2011-07-05 16:27:02 -04:00
parent ae3894de1e
commit 123a8b1c1e

View File

@ -77,9 +77,12 @@ class SmashwordsStore(BasicStoreConfig, StorePlugin):
title = ''.join(data.xpath('//a[@class="bookTitle"]/text()')) title = ''.join(data.xpath('//a[@class="bookTitle"]/text()'))
subnote = ''.join(data.xpath('//span[@class="subnote"]/text()')) subnote = ''.join(data.xpath('//span[@class="subnote"]/text()'))
author = ''.join(data.xpath('//span[@class="subnote"]/a/text()')) author = ''.join(data.xpath('//span[@class="subnote"]/a/text()'))
if '$' in subnote:
price = subnote.partition('$')[2] price = subnote.partition('$')[2]
price = price.split(u'\xa0')[0] price = price.split(u'\xa0')[0]
price = '$' + price price = '$' + price
else:
price = '$0.00'
counter -= 1 counter -= 1