From fda1d71b7c24173a9c3109bd273ce96b18620d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 26 Mar 2012 22:54:21 +0200 Subject: [PATCH] Ebookpoint got rocketboosted when formats became visible on store's result page --- src/calibre/gui2/store/stores/ebookpoint_plugin.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/store/stores/ebookpoint_plugin.py b/src/calibre/gui2/store/stores/ebookpoint_plugin.py index 19b2e0a428..94e6cc73ca 100644 --- a/src/calibre/gui2/store/stores/ebookpoint_plugin.py +++ b/src/calibre/gui2/store/stores/ebookpoint_plugin.py @@ -3,7 +3,7 @@ from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL 3' -__copyright__ = '2011, Tomasz Długosz ' +__copyright__ = '2011-2012, Tomasz Długosz ' __docformat__ = 'restructuredtext en' import re @@ -64,9 +64,7 @@ class EbookpointStore(BasicStoreConfig, StorePlugin): author = ''.join(data.xpath('.//p[@class="author"]/text()')) price = ''.join(data.xpath('.//p[@class="price"]/ins/text()')) - with closing(br.open(id.strip(), timeout=timeout)) as nf: - idata = html.fromstring(nf.read()) - formats = ', '.join(idata.xpath('//dd[@class="radio-line"]/label/text()')) + formats = ', '.join(data.xpath('.//div[@class="ikony"]/span/text()')) counter -= 1 @@ -77,6 +75,6 @@ class EbookpointStore(BasicStoreConfig, StorePlugin): s.price = re.sub(r'\.',',',price) s.detail_item = id.strip() s.drm = SearchResult.DRM_UNLOCKED - s.formats = formats.upper().strip() + s.formats = formats.upper() yield s