fix covers in nexto

This commit is contained in:
Tomasz Długosz 2013-02-11 22:36:05 +01:00
parent ddfaaf080c
commit 43de6a620e

View File

@ -66,6 +66,8 @@ class NextoStore(BasicStoreConfig, StorePlugin):
price = ''.join(data.xpath('.//strong[@class="nprice"]/text()'))
cover_url = ''.join(data.xpath('.//img[@class="cover"]/@src'))
cover_url = re.sub(r'%2F', '/', cover_url)
cover_url = re.sub(r'\widthMax=120&heightMax=200', 'widthMax=64&heightMax=64', cover_url)
title = ''.join(data.xpath('.//a[@class="title"]/text()'))
title = re.sub(r' - ebook$', '', title)
formats = ', '.join(data.xpath('.//ul[@class="formats_available"]/li//b/text()'))
@ -80,7 +82,7 @@ class NextoStore(BasicStoreConfig, StorePlugin):
counter -= 1
s = SearchResult()
s.cover_url = cover_url
s.cover_url = 'http://www.nexto.pl' + cover_url
s.title = title.strip()
s.author = author.strip()
s.price = price