From a030faea35ee407fc953d362ce2e44ea989b11c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 11 Feb 2013 21:56:29 +0100 Subject: [PATCH 1/6] fix cover and format detection in virtualo --- 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 02396b7f19..1928a7017e 100644 --- a/src/calibre/gui2/store/stores/virtualo_plugin.py +++ b/src/calibre/gui2/store/stores/virtualo_plugin.py @@ -55,10 +55,10 @@ class VirtualoStore(BasicStoreConfig, StorePlugin): continue price = ''.join(data.xpath('.//span[@class="price"]/text() | .//span[@class="price abbr"]/text()')) - cover_url = ''.join(data.xpath('.//div[@class="list_middle_left"]//a/img/@src')) + cover_url = ''.join(data.xpath('.//div[@class="list_middle_left"]//a//img/@src')) title = ''.join(data.xpath('.//div[@class="list_title list_text_left"]/a/text()')) author = ', '.join(data.xpath('.//div[@class="list_authors list_text_left"]/a/text()')) - formats = [ form.split('_')[-1].replace('.png', '') for form in data.xpath('.//div[@style="width:55%;float:left;text-align:left;height:18px;"]//img/@src')] + formats = [ form.split('_')[-1].replace('.png', '') for form in data.xpath('.//div[@style="width:55%;float:left;text-align:left;height:18px;"]//a/img/@src')] nodrm = no_drm_pattern.search(''.join(data.xpath('.//div[@style="width:45%;float:right;text-align:right;height:18px;"]/div/div/text()'))) counter -= 1 From 1bb04e2af94a87cc12817bf1939f3a4e9c54ca63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 11 Feb 2013 22:02:34 +0100 Subject: [PATCH 2/6] fix cover in empik --- src/calibre/gui2/store/stores/empik_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/stores/empik_plugin.py b/src/calibre/gui2/store/stores/empik_plugin.py index 5c3f21c25b..dcec78d7fd 100644 --- a/src/calibre/gui2/store/stores/empik_plugin.py +++ b/src/calibre/gui2/store/stores/empik_plugin.py @@ -51,7 +51,7 @@ class EmpikStore(BasicStoreConfig, StorePlugin): if not id: continue - cover_url = ''.join(data.xpath('.//div[@class="productBox-450Pic"]/a/img/@src')) + cover_url = ''.join(data.xpath('.//div[@class="productBox-450Pic"]/a/img/@data-original')) title = ''.join(data.xpath('.//a[@class="productBox-450Title"]/text()')) title = re.sub(r' \(ebook\)', '', title) author = ''.join(data.xpath('.//div[@class="productBox-450Author"]/a/text()')) From ddfaaf080c63cc16f5569923a81e8027aa2fda59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 11 Feb 2013 22:07:22 +0100 Subject: [PATCH 3/6] improve authors field in legimi --- src/calibre/gui2/store/stores/legimi_plugin.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/calibre/gui2/store/stores/legimi_plugin.py b/src/calibre/gui2/store/stores/legimi_plugin.py index 85561c63f3..8810f551db 100644 --- a/src/calibre/gui2/store/stores/legimi_plugin.py +++ b/src/calibre/gui2/store/stores/legimi_plugin.py @@ -61,8 +61,6 @@ class LegimiStore(BasicStoreConfig, StorePlugin): cover_url = ''.join(data.xpath('.//img[1]/@src')) title = ''.join(data.xpath('.//span[@class="bookListTitle ellipsis"]/text()')) author = ''.join(data.xpath('.//span[@class="bookListAuthor ellipsis"]/text()')) - author = re.sub(',','',author) - author = re.sub(';',',',author) price = ''.join(data.xpath('.//div[@class="bookListPrice"]/span/text()')) formats = [] with closing(br.open(id.strip(), timeout=timeout/4)) as nf: From 43de6a620e067b9ef64caf2d223847314dbf2f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 11 Feb 2013 22:36:05 +0100 Subject: [PATCH 4/6] fix covers in nexto --- src/calibre/gui2/store/stores/nexto_plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/stores/nexto_plugin.py b/src/calibre/gui2/store/stores/nexto_plugin.py index e5f9e31980..e52a0af9e9 100644 --- a/src/calibre/gui2/store/stores/nexto_plugin.py +++ b/src/calibre/gui2/store/stores/nexto_plugin.py @@ -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 From b6acd1b247a6417e12b9e83407698eb8c13254aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Tue, 12 Feb 2013 21:25:18 +0100 Subject: [PATCH 5/6] bump version number --- src/calibre/gui2/store/stores/empik_plugin.py | 4 ++-- src/calibre/gui2/store/stores/legimi_plugin.py | 4 ++-- src/calibre/gui2/store/stores/nexto_plugin.py | 4 ++-- src/calibre/gui2/store/stores/virtualo_plugin.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/calibre/gui2/store/stores/empik_plugin.py b/src/calibre/gui2/store/stores/empik_plugin.py index dcec78d7fd..c771722120 100644 --- a/src/calibre/gui2/store/stores/empik_plugin.py +++ b/src/calibre/gui2/store/stores/empik_plugin.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) -store_version = 1 # Needed for dynamic plugin loading +store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL 3' -__copyright__ = '2011-2012, Tomasz Długosz ' +__copyright__ = '2011-2013, Tomasz Długosz ' __docformat__ = 'restructuredtext en' import re diff --git a/src/calibre/gui2/store/stores/legimi_plugin.py b/src/calibre/gui2/store/stores/legimi_plugin.py index 8810f551db..1195866faa 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 = 1 # Needed for dynamic plugin loading +store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL 3' -__copyright__ = '2011, Tomasz Długosz ' +__copyright__ = '2011-2013, Tomasz Długosz ' __docformat__ = 'restructuredtext en' import re diff --git a/src/calibre/gui2/store/stores/nexto_plugin.py b/src/calibre/gui2/store/stores/nexto_plugin.py index e52a0af9e9..df3867ec1a 100644 --- a/src/calibre/gui2/store/stores/nexto_plugin.py +++ b/src/calibre/gui2/store/stores/nexto_plugin.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) -store_version = 1 # Needed for dynamic plugin loading +store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL 3' -__copyright__ = '2011-2012, Tomasz Długosz ' +__copyright__ = '2011-2013, Tomasz Długosz ' __docformat__ = 'restructuredtext en' import re diff --git a/src/calibre/gui2/store/stores/virtualo_plugin.py b/src/calibre/gui2/store/stores/virtualo_plugin.py index 1928a7017e..567da2df4e 100644 --- a/src/calibre/gui2/store/stores/virtualo_plugin.py +++ b/src/calibre/gui2/store/stores/virtualo_plugin.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) -store_version = 1 # Needed for dynamic plugin loading +store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL 3' -__copyright__ = '2011, Tomasz Długosz ' +__copyright__ = '2011-2013, Tomasz Długosz ' __docformat__ = 'restructuredtext en' import re From e94ae4ff421c2fbcd59e5039cdef44ea71ac9006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Tue, 12 Feb 2013 22:13:02 +0100 Subject: [PATCH 6/6] turn off zixo store as it's offline until 2/20 --- src/calibre/customize/builtins.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index e715cdb84e..ef03fcb6e3 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -1667,14 +1667,14 @@ class XinXiiStore(StoreBase): headquarters = 'DE' formats = ['EPUB', 'PDF'] -class StoreZixoStore(StoreBase): - name = 'Zixo' - author = u'Tomasz Długosz' - description = u'Księgarnia z ebookami oraz książkami audio. Aby otwierać książki w formacie Zixo należy zainstalować program dostępny na stronie księgarni. Umożliwia on m.in. dodawanie zakładek i dostosowywanie rozmiaru czcionki.' - actual_plugin = 'calibre.gui2.store.stores.zixo_plugin:ZixoStore' - - headquarters = 'PL' - formats = ['PDF, ZIXO'] +#class StoreZixoStore(StoreBase): +# name = 'Zixo' +# author = u'Tomasz Długosz' +# description = u'Księgarnia z ebookami oraz książkami audio. Aby otwierać książki w formacie Zixo należy zainstalować program dostępny na stronie księgarni. Umożliwia on m.in. dodawanie zakładek i dostosowywanie rozmiaru czcionki.' +# actual_plugin = 'calibre.gui2.store.stores.zixo_plugin:ZixoStore' +# +# headquarters = 'PL' +# formats = ['PDF, ZIXO'] plugins += [ StoreArchiveOrgStore, @@ -1725,8 +1725,8 @@ plugins += [ StoreWeightlessBooksStore, StoreWHSmithUKStore, StoreWoblinkStore, - XinXiiStore, - StoreZixoStore + XinXiiStore +# StoreZixoStore ] # }}}