From 8b32138a666cbcbd1689d5128d70e013f34eb05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Tue, 16 Jun 2015 23:04:04 +0200 Subject: [PATCH 1/2] Cdp Plugin: fix author detection --- src/calibre/gui2/store/stores/cdp_plugin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/stores/cdp_plugin.py b/src/calibre/gui2/store/stores/cdp_plugin.py index cfeec1e7f0..35b399844d 100644 --- a/src/calibre/gui2/store/stores/cdp_plugin.py +++ b/src/calibre/gui2/store/stores/cdp_plugin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) -store_version = 5 # Needed for dynamic plugin loading +store_version = 6 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2013-2015, Tomasz Długosz ' @@ -65,11 +65,10 @@ class CdpStore(BasicStoreConfig, StorePlugin): cover_url = ''.join(data.xpath('.//a[@class="product-image"]/img/@data-src')) title = ''.join(data.xpath('.//h3[1]/a/@title')) price = ''.join(data.xpath('.//span[@class="custom_price"]/text()'))+','+''.join(data.xpath('.//span[@class="custom_price"]/sup/text()')) - author = '' + author = ''.join(data.xpath('.//div[@class="authors"]/@title')) formats = '' with closing(br.open( id.strip(), timeout=timeout/4)) as nf: idata = html.fromstring(nf.read()) - author = ', '.join(idata.xpath('.//ul[@class="film-data"]/li[1]/p/text()')) formats = idata.xpath('//div[@class="product-attributes-container"][2]/ul/li/span/text()')[-1] counter -= 1 From 58d842aa26ebd6bef4974646d10bdd4342738905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Tue, 16 Jun 2015 23:17:30 +0200 Subject: [PATCH 2/2] Legimi Plugin: fix cover detection --- src/calibre/gui2/store/stores/legimi_plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/stores/legimi_plugin.py b/src/calibre/gui2/store/stores/legimi_plugin.py index c1ce4d8ab8..c2453c0e8b 100644 --- a/src/calibre/gui2/store/stores/legimi_plugin.py +++ b/src/calibre/gui2/store/stores/legimi_plugin.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) -store_version = 5 # Needed for dynamic plugin loading +store_version = 6 # Needed for dynamic plugin loading __license__ = 'GPL 3' -__copyright__ = '2011-2014, Tomasz Długosz ' +__copyright__ = '2011-2015, Tomasz Długosz ' __docformat__ = 'restructuredtext en' import re @@ -68,7 +68,7 @@ class LegimiStore(BasicStoreConfig, StorePlugin): counter -= 1 s = SearchResult() - s.cover_url = 'http://www.legimi.com/' + cover_url + s.cover_url = 'http:' + cover_url s.title = title.strip() s.author = author.strip() s.price = price