Commit 75b9f761 authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

New extract cover from body

parent 1ed778e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ class FB2Base(BookFile):
            tree = self.__create_tree__()
            res = tree.xpath('/fb:FictionBook/fb:description/fb:title-info/fb:coverpage/fb:image', namespaces=self.__namespaces)
            if len(res) == 0:
                res = tree.xpath('/fb:FictionBook/fb:body/fb:image', namespaces=self.__namespaces)
                res = tree.xpath('/fb:FictionBook/fb:body//fb:image', namespaces=self.__namespaces)
            cover_id = res[0].get('{' + Namespace.XLINK + '}href')[1:]
            print(cover_id)
            res = tree.xpath('/fb:FictionBook/fb:binary[@id="%s"]' % cover_id, namespaces=self.__namespaces)