diff --git a/src/calibre/gui2/store/stores/ebooks_com_plugin.py b/src/calibre/gui2/store/stores/ebooks_com_plugin.py index 455c705113..ab798f4df0 100644 --- a/src/calibre/gui2/store/stores/ebooks_com_plugin.py +++ b/src/calibre/gui2/store/stores/ebooks_com_plugin.py @@ -70,12 +70,16 @@ class EbookscomStore(BasicStoreConfig, StorePlugin): if not title or not author: continue + price = ''.join(data.xpath( + './/span[starts-with(text(), "US$") or starts-with(text(), "€") or starts-with(text(), "CA$") or starts-with(text(), "AU$") or starts-with(text(), "£")]/text()')).strip() + counter -= 1 s = SearchResult() s.cover_url = cover_url s.title = title.strip() s.author = author.strip() + s.price = price.strip() s.detail_item = '?url=http://www.ebooks.com/cj.asp?IID=' + id.strip() + '&cjsku=' + id.strip() yield s @@ -94,11 +98,6 @@ class EbookscomStore(BasicStoreConfig, StorePlugin): with closing(br.open(url + id, timeout=timeout)) as nf: pdoc = html.fromstring(nf.read()) - price_l = pdoc.xpath('//div[@class="book-info"]/div[@class="price"]/text()') - if price_l: - price = price_l[0] - search_result.price = price.strip() - search_result.drm = SearchResult.DRM_UNLOCKED permissions = ' '.join(pdoc.xpath('//div[@class="permissions-items"]//text()')) if 'off' in permissions: