take some authors
This commit is contained in:
parent
72ed51881b
commit
c333d53a64
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ def lookup(id):
|
||||||
if r["title"] == 'Error!':
|
if r["title"] == 'Error!':
|
||||||
return {}
|
return {}
|
||||||
keys = {
|
keys = {
|
||||||
#'author': 'Author(s)',
|
'author': 'Author(s)',
|
||||||
'publisher': 'Publisher',
|
'publisher': 'Publisher',
|
||||||
'date': 'Publication date',
|
'date': 'Publication date',
|
||||||
'edition': 'Edition',
|
'edition': 'Edition',
|
||||||
|
@ -81,12 +81,12 @@ def lookup(id):
|
||||||
for key in r:
|
for key in r:
|
||||||
if isinstance(r[key], str):
|
if isinstance(r[key], str):
|
||||||
r[key] = decode_html(strip_tags(r[key])).strip()
|
r[key] = decode_html(strip_tags(r[key])).strip()
|
||||||
'''
|
|
||||||
if 'author' in r and isinstance(r['author'], str) and r['author']:
|
if 'author' in r and isinstance(r['author'], str) and r['author']:
|
||||||
r['author'] = [r['author']]
|
r['author'] = [r['author']]
|
||||||
else:
|
else:
|
||||||
r['author'] = []
|
r['author'] = []
|
||||||
'''
|
if not r['author'] or r['author'][0].isupper():
|
||||||
|
del r['author']
|
||||||
if r['description'].lower() == 'Description of this item is not available at this time.'.lower():
|
if r['description'].lower() == 'Description of this item is not available at this time.'.lower():
|
||||||
r['description'] = ''
|
r['description'] = ''
|
||||||
return r
|
return r
|
||||||
|
|
Loading…
Add table
Reference in a new issue