mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
MOBI Input: Fix regression causing crash when converting certain MOBI/PRC files
This commit is contained in:
parent
5ac7ff5bf2
commit
66b0b6c58f
@ -294,8 +294,7 @@ class MobiReader(object):
|
|||||||
root = html.fromstring(self.processed_html)
|
root = html.fromstring(self.processed_html)
|
||||||
if root.xpath('descendant::p/descendant::p'):
|
if root.xpath('descendant::p/descendant::p'):
|
||||||
from lxml.html import soupparser
|
from lxml.html import soupparser
|
||||||
self.log.warning('Markup contains unclosed <p> tags, parsing using',
|
print 'Markup contains unclosed <p> tags, parsing using BeatifulSoup'
|
||||||
'BeatifulSoup')
|
|
||||||
root = soupparser.fromstring(self.processed_html)
|
root = soupparser.fromstring(self.processed_html)
|
||||||
self.upshift_markup(root)
|
self.upshift_markup(root)
|
||||||
guides = root.xpath('//guide')
|
guides = root.xpath('//guide')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user