Sync to lp:~cbhaley/calibre/charles_store.

This commit is contained in:
John Schember 2011-09-27 19:01:04 -04:00
commit 0fd056ad3b
3 changed files with 8 additions and 6 deletions

View File

@ -1236,7 +1236,7 @@ class StoreEbookNLStore(StoreBase):
headquarters = 'NL'
formats = ['EPUB', 'PDF']
affiliate = True
affiliate = False
class StoreEbookscomStore(StoreBase):
name = 'eBooks.com'

View File

@ -23,9 +23,8 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
class EBookNLStore(BasicStoreConfig, StorePlugin):
def open(self, parent=None, detail_item=None, external=False):
url = 'http://ad.zanox.com/ppc/?19015168C29310186T'
url_details = ('http://ad.zanox.com/ppc/?19016028C1098154549T&ULP=[['
'http://www.ebook.nl/store/{0}]]')
url = 'http://www.ebook.nl/'
url_details = ('http://www.ebook.nl/store/{0}')
if external or self.config.get('open_external', False):
if detail_item:

View File

@ -6,7 +6,7 @@ __license__ = 'GPL 3'
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
import urllib2
import urllib2, re
from contextlib import closing
from lxml import html
@ -67,7 +67,10 @@ class FoylesUKStore(BasicStoreConfig, StorePlugin):
title = ''.join(data.xpath('.//a[@class="Title"]/text()'))
author = ', '.join(data.xpath('.//span[@class="Author"]/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