From 4257cf6e3b88123bee053288e4d4e0edaa2e471a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Thu, 19 May 2011 22:56:28 +0200 Subject: [PATCH] improved Gandlf recipe --- src/calibre/gui2/store/gandalf_plugin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/store/gandalf_plugin.py b/src/calibre/gui2/store/gandalf_plugin.py index 192484d764..de8896428d 100644 --- a/src/calibre/gui2/store/gandalf_plugin.py +++ b/src/calibre/gui2/store/gandalf_plugin.py @@ -56,10 +56,9 @@ class GandalfStore(BasicStoreConfig, StorePlugin): cover_url = ''.join(data.xpath('.//img/@src')) title = ''.join(data.xpath('.//div[@class="info"]/h3/a/@title')) - temp = title.split() - title = ' '.join(temp[0:-1]) - formats = temp[-1] - author = ''.join(data.xpath('.//div[@class="info"]/h4/text()')) + formats = title.split() + formats = formats[-1] + author = ''.join(data.xpath('.//div[@class="info"]/h4/text() | .//div[@class="info"]/h4/span/text()')) price = ''.join(data.xpath('.//h3[@class="promocja"]/text()')) price = re.sub('PLN', 'zł', price) price = re.sub('\.', ',', price)