From 888768e14f19098724bee1c06cfa610de124f1e9 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 12 May 2012 13:29:45 -0400 Subject: [PATCH 1/3] Store: Fix smashwords plugin. --- src/calibre/gui2/store/stores/smashwords_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/stores/smashwords_plugin.py b/src/calibre/gui2/store/stores/smashwords_plugin.py index 7a7e756a05..2c69417612 100644 --- a/src/calibre/gui2/store/stores/smashwords_plugin.py +++ b/src/calibre/gui2/store/stores/smashwords_plugin.py @@ -53,7 +53,7 @@ class SmashwordsStore(BasicStoreConfig, StorePlugin): counter = max_results with closing(br.open(url, timeout=timeout)) as f: doc = html.fromstring(f.read()) - for data in doc.xpath('//div[@id="pageCenterContent2"]//div[@class="bookCoverImg"]'): + for data in doc.xpath('//div[@id="pageCenterContent"]//div[@class="bookCoverImg"]'): if counter <= 0: break data = html.fromstring(html.tostring(data)) From 6e540ae42e22ce7da456cd380ac03b1508a8275e Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 12 May 2012 13:34:10 -0400 Subject: [PATCH 2/3] Store: Kobo Fix DRM status. --- src/calibre/gui2/store/stores/kobo_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/stores/kobo_plugin.py b/src/calibre/gui2/store/stores/kobo_plugin.py index 249d59ec5c..c888c0a252 100644 --- a/src/calibre/gui2/store/stores/kobo_plugin.py +++ b/src/calibre/gui2/store/stores/kobo_plugin.py @@ -69,7 +69,7 @@ class KoboStore(BasicStoreConfig, StorePlugin): title = ''.join(data.xpath('.//div[@class="SCItemHeader"]/h1/a[1]/text()')) author = ', '.join(data.xpath('.//div[@class="SCItemSummary"]//span//a/text()')) - drm = data.xpath('boolean(.//span[@class="SCAvailibilityFormatsText" and contains(text(), "DRM")])') + drm = data.xpath('boolean(.//span[@class="SCAvailibilityFormatsText" and not(contains(text(), "DRM-Free"))])') counter -= 1 From 77afc010db3f8c8d3f477a634590a32798ae7d28 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 12 May 2012 13:38:06 -0400 Subject: [PATCH 3/3] Store: Diesel fix drm status. --- src/calibre/gui2/store/stores/diesel_ebooks_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/stores/diesel_ebooks_plugin.py b/src/calibre/gui2/store/stores/diesel_ebooks_plugin.py index 1d410e2c38..3991be554d 100644 --- a/src/calibre/gui2/store/stores/diesel_ebooks_plugin.py +++ b/src/calibre/gui2/store/stores/diesel_ebooks_plugin.py @@ -72,7 +72,7 @@ class DieselEbooksStore(BasicStoreConfig, StorePlugin): formats = ', '.join(data.xpath('.//div[@class="book-info"]//text()')).strip() a, b, formats = formats.partition('Format:') drm = SearchResult.DRM_LOCKED - if 'drm free' not in formats.lower(): + if 'drm free' in formats.lower(): drm = SearchResult.DRM_UNLOCKED