mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Sync to lp:~cbhaley/calibre/charles_store.
This commit is contained in:
commit
0fd056ad3b
@ -1236,7 +1236,7 @@ class StoreEbookNLStore(StoreBase):
|
|||||||
|
|
||||||
headquarters = 'NL'
|
headquarters = 'NL'
|
||||||
formats = ['EPUB', 'PDF']
|
formats = ['EPUB', 'PDF']
|
||||||
affiliate = True
|
affiliate = False
|
||||||
|
|
||||||
class StoreEbookscomStore(StoreBase):
|
class StoreEbookscomStore(StoreBase):
|
||||||
name = 'eBooks.com'
|
name = 'eBooks.com'
|
||||||
|
@ -23,9 +23,8 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
|
|||||||
class EBookNLStore(BasicStoreConfig, StorePlugin):
|
class EBookNLStore(BasicStoreConfig, StorePlugin):
|
||||||
|
|
||||||
def open(self, parent=None, detail_item=None, external=False):
|
def open(self, parent=None, detail_item=None, external=False):
|
||||||
url = 'http://ad.zanox.com/ppc/?19015168C29310186T'
|
url = 'http://www.ebook.nl/'
|
||||||
url_details = ('http://ad.zanox.com/ppc/?19016028C1098154549T&ULP=[['
|
url_details = ('http://www.ebook.nl/store/{0}')
|
||||||
'http://www.ebook.nl/store/{0}]]')
|
|
||||||
|
|
||||||
if external or self.config.get('open_external', False):
|
if external or self.config.get('open_external', False):
|
||||||
if detail_item:
|
if detail_item:
|
||||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import urllib2
|
import urllib2, re
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
from lxml import html
|
from lxml import html
|
||||||
@ -67,7 +67,10 @@ class FoylesUKStore(BasicStoreConfig, StorePlugin):
|
|||||||
title = ''.join(data.xpath('.//a[@class="Title"]/text()'))
|
title = ''.join(data.xpath('.//a[@class="Title"]/text()'))
|
||||||
author = ', '.join(data.xpath('.//span[@class="Author"]/text()'))
|
author = ', '.join(data.xpath('.//span[@class="Author"]/text()'))
|
||||||
price = ''.join(data.xpath('./ul/li[@class="Strong"]/text()'))
|
price = ''.join(data.xpath('./ul/li[@class="Strong"]/text()'))
|
||||||
price = price[price.rfind(' '):]
|
mo = re.search('£[\d\.]+', price)
|
||||||
|
if mo is None:
|
||||||
|
continue
|
||||||
|
price = mo.group(0)
|
||||||
|
|
||||||
counter -= 1
|
counter -= 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user