improved Gandlf recipe

This commit is contained in:
Tomasz Długosz 2011-05-19 22:56:28 +02:00
parent da5a1a1b22
commit 4257cf6e3b

View File

@ -56,10 +56,9 @@ class GandalfStore(BasicStoreConfig, StorePlugin):
cover_url = ''.join(data.xpath('.//img/@src')) cover_url = ''.join(data.xpath('.//img/@src'))
title = ''.join(data.xpath('.//div[@class="info"]/h3/a/@title')) title = ''.join(data.xpath('.//div[@class="info"]/h3/a/@title'))
temp = title.split() formats = title.split()
title = ' '.join(temp[0:-1]) formats = formats[-1]
formats = temp[-1] author = ''.join(data.xpath('.//div[@class="info"]/h4/text() | .//div[@class="info"]/h4/span/text()'))
author = ''.join(data.xpath('.//div[@class="info"]/h4/text()'))
price = ''.join(data.xpath('.//h3[@class="promocja"]/text()')) price = ''.join(data.xpath('.//h3[@class="promocja"]/text()'))
price = re.sub('PLN', '', price) price = re.sub('PLN', '', price)
price = re.sub('\.', ',', price) price = re.sub('\.', ',', price)