Store: Fix Smashwords plugin.

This commit is contained in:
John Schember 2012-12-30 21:16:16 -05:00
parent 9dbeb3c877
commit 0b9720f2d2

View File

@ -76,7 +76,7 @@ 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[1]//text()'))
if '$' in subnote: if '$' in subnote:
price = subnote.partition('$')[2] price = subnote.partition('$')[2]
price = price.split(u'\xa0')[0] price = price.split(u'\xa0')[0]