query fixes, avoid empty authors
This commit is contained in:
parent
198a01f05b
commit
1e082c3d1b
3 changed files with 14 additions and 5 deletions
|
|
@ -60,7 +60,10 @@ def metadata(f, from_=None):
|
|||
data['primaryid'] = ['asin', data['asin'][0]]
|
||||
if 'author' in data:
|
||||
if isinstance(data['author'], basestring):
|
||||
data['author'] = data['author'].split('; ')
|
||||
if data['author'].strip():
|
||||
data['author'] = data['author'].strip().split('; ')
|
||||
else:
|
||||
del data['author']
|
||||
if data['author'] in (['Administrator'], ['Default'], ['user']):
|
||||
del data['author']
|
||||
if not 'title' in data:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue