mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-29 14:27:41 +00:00
Least change to adapt with python3
change some syntax - except clause - unicode -> bulitins.str - sqllite uri - fix import local path - 01 to 1 (0 is meaningless) add module - future - builtins (from future) - imp (python3 ) - past (from future) - sqlalchemy (update one) refer to http://python-future.org/compatible_idioms.html
This commit is contained in:
@@ -37,16 +37,16 @@ def get_fb2_info(tmp_file_path, original_file_extension):
|
||||
first_name = u''
|
||||
return first_name + ' ' + middle_name + ' ' + last_name
|
||||
|
||||
author = unicode(", ".join(map(get_author, authors)))
|
||||
author = str(", ".join(map(get_author, authors)))
|
||||
|
||||
title = tree.xpath('/fb:FictionBook/fb:description/fb:title-info/fb:book-title/text()', namespaces=ns)
|
||||
if len(title):
|
||||
title = unicode(title[0])
|
||||
title = str(title[0])
|
||||
else:
|
||||
title = u''
|
||||
description = tree.xpath('/fb:FictionBook/fb:description/fb:publish-info/fb:book-name/text()', namespaces=ns)
|
||||
if len(description):
|
||||
description = unicode(description[0])
|
||||
description = str(description[0])
|
||||
else:
|
||||
description = u''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user