mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix reading metadata from HTML files.
This commit is contained in:
parent
6e8f39d669
commit
1bc13335a2
@ -45,7 +45,7 @@ def get_metadata(stream):
|
||||
if match:
|
||||
author = match.group(1).replace(',', ';')
|
||||
|
||||
mi = MetaInformation(title, [author])
|
||||
mi = MetaInformation(title, [author] if author else None)
|
||||
|
||||
# Publisher
|
||||
pat = re.compile(r'<!--.*?PUBLISHER=[\'"]([^"\']+)[\'"].*?-->', re.DOTALL)
|
||||
@ -60,8 +60,6 @@ def get_metadata(stream):
|
||||
isbn = match.group(1)
|
||||
mi.isbn = re.sub(r'[^0-9xX]', '', isbn)
|
||||
|
||||
print mi
|
||||
|
||||
return mi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user