diff --git a/src/calibre/gui2/store/stores/empik_plugin.py b/src/calibre/gui2/store/stores/empik_plugin.py index 5c3f21c25b..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 @@ -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()')) diff --git a/src/calibre/gui2/store/stores/legimi_plugin.py b/src/calibre/gui2/store/stores/legimi_plugin.py index 85561c63f3..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 @@ -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: diff --git a/src/calibre/gui2/store/stores/nexto_plugin.py b/src/calibre/gui2/store/stores/nexto_plugin.py index e5f9e31980..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 @@ -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 diff --git a/src/calibre/gui2/store/stores/virtualo_plugin.py b/src/calibre/gui2/store/stores/virtualo_plugin.py index 02396b7f19..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 @@ -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