From 5f46a68c01418a94a71fe1b0a57f9c2f7737c628 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 1 Dec 2015 10:38:00 +0100 Subject: [PATCH] no more authors --- oml/meta/lookupbyisbn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oml/meta/lookupbyisbn.py b/oml/meta/lookupbyisbn.py index 8385422..24217df 100644 --- a/oml/meta/lookupbyisbn.py +++ b/oml/meta/lookupbyisbn.py @@ -54,12 +54,13 @@ def lookup(id): 'asin': [id] } url = '%s/Lookup/Book/%s/%s/1' % (base, id, id) + logger.debug('%s', url) data = read_url(url).decode('utf-8') r["title"] = find_re(data, "

(.*?)

") if r["title"] == 'Error!': return {} keys = { - 'author': 'Author(s)', + #'author': 'Author(s)', 'publisher': 'Publisher', 'date': 'Publication date', 'edition': 'Edition', @@ -80,10 +81,12 @@ def lookup(id): for key in r: if isinstance(r[key], str): r[key] = decode_html(strip_tags(r[key])).strip() + ''' if 'author' in r and isinstance(r['author'], str) and r['author']: r['author'] = [r['author']] else: r['author'] = [] + ''' if r['description'].lower() == 'Description of this item is not available at this time.'.lower(): r['description'] = '' return r