mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 04:18:56 +02:00
Fix
This commit is contained in:
parent
20f608294d
commit
2b0cf3fed5
1 changed files with 1 additions and 0 deletions
|
|
@ -436,6 +436,7 @@ def parse_html(self):
|
|||
''' Create lxml ElementTree from HTML '''
|
||||
self.log_info('\tParsing '+os.sep.join(self.htmlfile.path.split(os.sep)[-3:]))
|
||||
src = open(self.htmlfile.path, 'rb').read().decode(self.htmlfile.encoding, 'replace').strip()
|
||||
src = src[src.find('<'):]
|
||||
src = self.preprocess(src)
|
||||
# lxml chokes on unicode input when it contains encoding declarations
|
||||
for pat in ENCODING_PATS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue