avoid space titles
This commit is contained in:
parent
992dc568c2
commit
e877371a0b
2 changed files with 6 additions and 0 deletions
|
@ -178,6 +178,9 @@ def info(epub):
|
|||
data['date'] = data['date'].split('T')[0]
|
||||
if 'language' in data and isinstance(data['language'], str):
|
||||
data['language'] = get_language(data['language'])
|
||||
for key in list(data):
|
||||
if isinstance(data[key], str) and not data[key].strip():
|
||||
del data[key]
|
||||
return data
|
||||
|
||||
def extract_text(path):
|
||||
|
|
|
@ -224,6 +224,9 @@ def info(pdf):
|
|||
for key in ('title', 'author', 'producer', 'creator'):
|
||||
if key in data:
|
||||
del data[key]
|
||||
for key in list(data):
|
||||
if isinstance(data[key], str) and not data[key].strip():
|
||||
del data[key]
|
||||
return data
|
||||
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue