diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index a79078988a..1499dbe3f4 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -1228,17 +1228,6 @@ class StoreEbookscomStore(StoreBase): formats = ['EPUB', 'LIT', 'MOBI', 'PDF'] affiliate = True -#class StoreEPubBuyDEStore(StoreBase): -# name = 'EPUBBuy DE' -# author = 'Charles Haley' -# description = u'Bei EPUBBuy.com finden Sie ausschliesslich eBooks im weitverbreiteten EPUB-Format und ohne DRM. So haben Sie die freie Wahl, wo Sie Ihr eBook lesen: Tablet, eBook-Reader, Smartphone oder einfach auf Ihrem PC. So macht eBook-Lesen Spaß!' -# actual_plugin = 'calibre.gui2.store.stores.epubbuy_de_plugin:EPubBuyDEStore' -# -# drm_free_only = True -# headquarters = 'DE' -# formats = ['EPUB'] -# affiliate = True - class StoreEBookShoppeUKStore(StoreBase): name = 'ebookShoppe UK' author = u'Charles Haley' @@ -1266,16 +1255,7 @@ class StoreEKnigiStore(StoreBase): headquarters = 'BG' formats = ['EPUB', 'PDF', 'HTML'] - #affiliate = True - -class StoreEpubBudStore(StoreBase): - name = 'ePub Bud' - description = 'Well, it\'s pretty much just "YouTube for Children\'s eBooks. A not-for-profit organization devoted to brining self published childrens books to the world.' - actual_plugin = 'calibre.gui2.store.stores.epubbud_plugin:EpubBudStore' - - drm_free_only = True - headquarters = 'US' - formats = ['EPUB'] + affiliate = True class StoreFeedbooksStore(StoreBase): name = 'Feedbooks' @@ -1491,10 +1471,8 @@ plugins += [ StoreEbookNLStore, StoreEbookscomStore, StoreEBookShoppeUKStore, -# StoreEPubBuyDEStore, StoreEHarlequinStore, StoreEKnigiStore, - StoreEpubBudStore, StoreFeedbooksStore, StoreFoylesUKStore, StoreGandalfStore, diff --git a/src/calibre/gui2/store/stores/epubbud_plugin.py b/src/calibre/gui2/store/stores/epubbud_plugin.py deleted file mode 100644 index 029b2b3fc9..0000000000 --- a/src/calibre/gui2/store/stores/epubbud_plugin.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -from __future__ import (unicode_literals, division, absolute_import, print_function) - -__license__ = 'GPL 3' -__copyright__ = '2011, John Schember ' -__docformat__ = 'restructuredtext en' - -from calibre.gui2.store.basic_config import BasicStoreConfig -from calibre.gui2.store.opensearch_store import OpenSearchOPDSStore -from calibre.gui2.store.search_result import SearchResult - -class EpubBudStore(BasicStoreConfig, OpenSearchOPDSStore): - - open_search_url = 'http://www.epubbud.com/feeds/opensearch.xml' - web_url = 'http://www.epubbud.com/' - - # http://www.epubbud.com/feeds/catalog.atom - - def search(self, query, max_results=10, timeout=60): - for s in OpenSearchOPDSStore.search(self, query, max_results, timeout): - s.price = '$0.00' - s.drm = SearchResult.DRM_UNLOCKED - s.formats = 'EPUB' - # Download links are broken for this store. - s.downloads = {} - yield s diff --git a/src/calibre/gui2/store/stores/epubbuy_de_plugin.py b/src/calibre/gui2/store/stores/epubbuy_de_plugin.py deleted file mode 100644 index 242ef76793..0000000000 --- a/src/calibre/gui2/store/stores/epubbuy_de_plugin.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- - -from __future__ import (unicode_literals, division, absolute_import, print_function) - -__license__ = 'GPL 3' -__copyright__ = '2011, John Schember ' -__docformat__ = 'restructuredtext en' - -import urllib2 -from contextlib import closing - -from lxml import html - -from PyQt4.Qt import QUrl - -from calibre import browser -from calibre.gui2 import open_url -from calibre.gui2.store import StorePlugin -from calibre.gui2.store.basic_config import BasicStoreConfig -from calibre.gui2.store.search_result import SearchResult -from calibre.gui2.store.web_store_dialog import WebStoreDialog - -class EPubBuyDEStore(BasicStoreConfig, StorePlugin): - - def open(self, parent=None, detail_item=None, external=False): - url = 'http://klick.affiliwelt.net/klick.php?bannerid=47653&pid=32307&prid=2627' - url_details = ('http://klick.affiliwelt.net/klick.php?bannerid=47653' - '&pid=32307&prid=2627&prodid={0}') - - if external or self.config.get('open_external', False): - if detail_item: - url = url_details.format(detail_item) - open_url(QUrl(url)) - else: - detail_url = None - if detail_item: - detail_url = url_details.format(detail_item) - d = WebStoreDialog(self.gui, url, parent, detail_url) - d.setWindowTitle(self.name) - d.set_tags(self.config.get('tags', '')) - d.exec_() - - def search(self, query, max_results=10, timeout=60): - url = 'http://www.epubbuy.com/search.php?search_query=' + urllib2.quote(query) - br = browser() - - counter = max_results - with closing(br.open(url, timeout=timeout)) as f: - doc = html.fromstring(f.read()) - for data in doc.xpath('//li[contains(@class, "ajax_block_product")]'): - if counter <= 0: - break - - id = ''.join(data.xpath('./div[@class="center_block"]' - '/p[contains(text(), "artnr:")]/text()')).strip() - if not id: - continue - id = id[6:].strip() - if not id: - continue - cover_url = ''.join(data.xpath('./div[@class="center_block"]' - '/a[@class="product_img_link"]/img/@src')) - if cover_url: - cover_url = 'http://www.epubbuy.com' + cover_url - title = ''.join(data.xpath('./div[@class="center_block"]' - '/a[@class="product_img_link"]/@title')) - author = ''.join(data.xpath('./div[@class="center_block"]/a[2]/text()')) - price = ''.join(data.xpath('.//span[@class="price"]/text()')) - counter -= 1 - - s = SearchResult() - s.cover_url = cover_url - s.title = title.strip() - s.author = author.strip() - s.price = price - s.drm = SearchResult.DRM_UNLOCKED - s.detail_item = id - s.formats = 'ePub' - - yield s