From 00edb22400cb740ea15630c8d79c3e110de98130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 12 Sep 2016 20:11:05 +0200 Subject: [PATCH 1/2] virtualo plugin: coma instead of dot in price --- src/calibre/gui2/store/stores/virtualo_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/store/stores/virtualo_plugin.py b/src/calibre/gui2/store/stores/virtualo_plugin.py index 4c88c18788..ab5bbd8ed2 100644 --- a/src/calibre/gui2/store/stores/virtualo_plugin.py +++ b/src/calibre/gui2/store/stores/virtualo_plugin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) -store_version = 6 # Needed for dynamic plugin loading +store_version = 7 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2011-2016, Tomasz Długosz ' @@ -74,7 +74,7 @@ class VirtualoStore(BasicStoreConfig, StorePlugin): s.cover_url = cover_url s.title = title.strip() s.author = author.strip() - s.price = price.strip() + s.price = re.sub('\.',',',price.strip()) s.detail_item = 'http://virtualo.pl' + id.strip().split('http://')[0] s.formats = ', '.join(formats).upper() s.drm = SearchResult.DRM_UNLOCKED if nodrm else SearchResult.DRM_LOCKED From d1cf35f279140dcb08881a70424de45be15badb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 12 Sep 2016 20:32:35 +0200 Subject: [PATCH 2/2] publio plugin: fix title lookup --- src/calibre/gui2/store/stores/publio_plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/stores/publio_plugin.py b/src/calibre/gui2/store/stores/publio_plugin.py index b11cf5aaa8..a62365b39f 100644 --- a/src/calibre/gui2/store/stores/publio_plugin.py +++ b/src/calibre/gui2/store/stores/publio_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__ = '2012-2015, Tomasz Długosz ' +__copyright__ = '2012-2016, Tomasz Długosz ' __docformat__ = 'restructuredtext en' import urllib @@ -53,7 +53,7 @@ class PublioStore(BasicStoreConfig, StorePlugin): continue cover_url = ''.join(data.xpath('.//img[@class="product-tile-cover-photo"]/@src')) - title = ''.join(data.xpath('.//h3[@class="product-tile-title"]/a/text()')) + title = ''.join(data.xpath('.//h3[@class="product-tile-title"]/a/span[1]/text()')) author = ', '.join(data.xpath('.//span[@class="product-tile-author"]/a/text()')) price = ''.join(data.xpath('.//div[@class="product-tile-price-wrapper "]/a/ins/text()')) # formats = ', '.join([x.strip() for x in data.xpath('.//div[@class="formats"]/a/text()')])