Store: ...

This commit is contained in:
John Schember 2011-05-28 10:41:51 -04:00
parent 93128ab03f
commit 9b245bdcf5
2 changed files with 6 additions and 7 deletions

View File

@ -1420,7 +1420,7 @@ plugins += [
StoreBeWriteStore, StoreBeWriteStore,
StoreDieselEbooksStore, StoreDieselEbooksStore,
StoreEbookscomStore, StoreEbookscomStore,
#StoreEBookShoppeUKStore, StoreEBookShoppeUKStore,
StoreEPubBuyDEStore, StoreEPubBuyDEStore,
StoreEHarlequinStore, StoreEHarlequinStore,
StoreFeedbooksStore, StoreFeedbooksStore,

View File

@ -62,18 +62,17 @@ class EBookShoppeUKStore(BasicStoreConfig, StorePlugin):
s = SearchResult() s = SearchResult()
s.cover_url = cover_url s.cover_url = cover_url
s.title = title.strip() s.title = title.strip()
# Set the author to the query terms to ensure that author
# queries match something when pruning searches. Of course, this
# means that all books will match. Sigh...
s.author = query
s.price = price s.price = price
s.drm = SearchResult.DRM_UNLOCKED s.drm = SearchResult.DRM_UNLOCKED
s.detail_item = id s.detail_item = id
s.formats = ''
self.my_get_details(s, timeout)
if not s.author:
continue
yield s yield s
def get_details(self, search_result, timeout): def my_get_details(self, search_result, timeout):
br = browser() br = browser()
with closing(br.open(search_result.detail_item, timeout=timeout)) as nf: with closing(br.open(search_result.detail_item, timeout=timeout)) as nf:
idata = html.fromstring(nf.read()) idata = html.fromstring(nf.read())