mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: Fix price for Smashwords store.
This commit is contained in:
parent
ae3894de1e
commit
123a8b1c1e
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user