From d2263aef00ed409c790a621eaa1b6d4600b7ab9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Tue, 27 Mar 2012 23:36:22 +0200 Subject: [PATCH] MOBI spotted in nexto --- src/calibre/customize/builtins.py | 2 +- src/calibre/gui2/store/stores/nexto_plugin.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index 3e91bc2ef3..14e0a564db 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -1460,7 +1460,7 @@ class StoreNextoStore(StoreBase): actual_plugin = 'calibre.gui2.store.stores.nexto_plugin:NextoStore' headquarters = 'PL' - formats = ['EPUB', 'PDF'] + formats = ['EPUB', 'MOBI', 'PDF'] affiliate = True class StoreOpenBooksStore(StoreBase): diff --git a/src/calibre/gui2/store/stores/nexto_plugin.py b/src/calibre/gui2/store/stores/nexto_plugin.py index f7572e6522..79cb1be2f1 100644 --- a/src/calibre/gui2/store/stores/nexto_plugin.py +++ b/src/calibre/gui2/store/stores/nexto_plugin.py @@ -68,8 +68,8 @@ class NextoStore(BasicStoreConfig, StorePlugin): 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()')) - DrmFree = re.search(r'bez.DRM', formats) - formats = re.sub(r'\(.+\)', '', formats) + DrmFree = re.search(r'znak', formats) + formats = re.sub(r'\ ?\(.+?\)', '', formats) author = '' with closing(br.open('http://www.nexto.pl/' + id.strip(), timeout=timeout/4)) as nf: